Message ID | 8e5526ef14150778871ac7c937c8993c6a09cd3e.1644992610.git.riteshh@linux.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-fsdevel-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A9AAC433FE for <linux-fsdevel@archiver.kernel.org>; Wed, 16 Feb 2022 07:07:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229602AbiBPHH3 (ORCPT <rfc822;linux-fsdevel@archiver.kernel.org>); Wed, 16 Feb 2022 02:07:29 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:34246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229486AbiBPHHZ (ORCPT <rfc822;linux-fsdevel@vger.kernel.org>); Wed, 16 Feb 2022 02:07:25 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AA272C8C65; Tue, 15 Feb 2022 23:06:37 -0800 (PST) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 21G6dXZ0023870; Wed, 16 Feb 2022 07:03:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=WW7lsfdrs88dftZzeg99wNOJWcVbwVtQHeVUtn1iB8s=; b=KiqvgQ+ZHg4IOukUkDQQna8oiVwQ5XIqBjCLxJ1Fs54qbAZ+r1kIOtYrzuJew5FM7TAx 5MdusfkHiC2I0mCeK3Zpt+FBiFk83qK0t2y+icqLBHYhhoQ17tPYzUGIT21wGzxHbvGe Cki3eZfO+x5SLPGJ8Ned3UGJ5UsK1iGSOAUBVPoz1ZizztGd6yTq8VeTg/Z28v2+AwIP XdU8q5VCWu+fKUVI0b07739SteN7SZMCcw1kgUDChvKgtGexM90A1RK3hL8SfRC3O0lq P+9G4dSSVc4cGqPxwcdPdSpMvXeR1zYXc6gUHwcGmRugm4bKpg3ldvIi1N5IxYzZGu5T 1A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3e8tyuhw5a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Feb 2022 07:03:08 +0000 Received: from m0098420.ppops.net (m0098420.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 21G6dVE2023755; Wed, 16 Feb 2022 07:03:07 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 3e8tyuhw4b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Feb 2022 07:03:07 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 21G72kmO004559; Wed, 16 Feb 2022 07:03:05 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma03ams.nl.ibm.com with ESMTP id 3e64ha5hc2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Feb 2022 07:03:05 +0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 21G733Vn45875586 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 Feb 2022 07:03:03 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 85EC042054; Wed, 16 Feb 2022 07:03:03 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1412142042; Wed, 16 Feb 2022 07:03:03 +0000 (GMT) Received: from localhost (unknown [9.43.85.173]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 16 Feb 2022 07:03:02 +0000 (GMT) From: Ritesh Harjani <riteshh@linux.ibm.com> To: linux-ext4@vger.kernel.org Cc: Jan Kara <jack@suse.cz>, "Theodore Ts'o" <tytso@mit.edu>, Andreas Dilger <adilger.kernel@dilger.ca>, Harshad Shirwadkar <harshadshirwadkar@gmail.com>, linux-fsdevel@vger.kernel.org, Ritesh Harjani <riteshh@linux.ibm.com> Subject: [PATCHv2 4/9] ext4: Use in_range() for range checking in ext4_fc_replay_check_excluded Date: Wed, 16 Feb 2022 12:32:46 +0530 Message-Id: <8e5526ef14150778871ac7c937c8993c6a09cd3e.1644992610.git.riteshh@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <cover.1644992609.git.riteshh@linux.ibm.com> References: <cover.1644992609.git.riteshh@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: VIeZtG8Uvw5iYEDMzyWyIN5zMXC2lU1Q X-Proofpoint-ORIG-GUID: N2zJKuji_xwonlyPwHRz-qmF8RUExbD7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-02-16_02,2022-02-14_04,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 spamscore=0 clxscore=1015 impostorscore=0 phishscore=0 mlxlogscore=853 suspectscore=0 adultscore=0 priorityscore=1501 bulkscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202160038 Precedence: bulk List-ID: <linux-fsdevel.vger.kernel.org> X-Mailing-List: linux-fsdevel@vger.kernel.org |
Series |
ext4: fast_commit fixes, stricter block checking & cleanups
|
expand
|
diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c index 7964ee34e322..3c5baca38767 100644 --- a/fs/ext4/fast_commit.c +++ b/fs/ext4/fast_commit.c @@ -1875,8 +1875,8 @@ bool ext4_fc_replay_check_excluded(struct super_block *sb, ext4_fsblk_t blk) if (state->fc_regions[i].ino == 0 || state->fc_regions[i].len == 0) continue; - if (blk >= state->fc_regions[i].pblk && - blk < state->fc_regions[i].pblk + state->fc_regions[i].len) + if (in_range(blk, state->fc_regions[i].pblk, + state->fc_regions[i].len)) return true; } return false;