aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/fast_commit.c
diff options
context:
space:
mode:
authorRitesh Harjani <[email protected]>2022-02-16 07:02:46 +0000
committerTheodore Ts'o <[email protected]>2022-02-26 02:34:56 +0000
commitdbaafbadc5c3dad4010099d0ff135204a8dbff49 (patch)
tree142b62743ddfbeb550f87efbb4fe47b14d4237b7 /fs/ext4/fast_commit.c
parentext4: refactor ext4_free_blocks() to pull out ext4_mb_clear_bb() (diff)
downloadkernel-dbaafbadc5c3dad4010099d0ff135204a8dbff49.tar.gz
kernel-dbaafbadc5c3dad4010099d0ff135204a8dbff49.zip
ext4: use in_range() for range checking in ext4_fc_replay_check_excluded
Instead of open coding it, use in_range() function instead. Signed-off-by: Ritesh Harjani <[email protected]> Reviewed-by: Jan Kara <[email protected]> Link: https://lore.kernel.org/r/8e5526ef14150778871ac7c937c8993c6a09cd3e.1644992610.git.riteshh@linux.ibm.com Signed-off-by: Theodore Ts'o <[email protected]>
Diffstat (limited to 'fs/ext4/fast_commit.c')
-rw-r--r--fs/ext4/fast_commit.c4
1 files changed, 2 insertions, 2 deletions
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;