提交 dbaafbad 编写于 作者: R Ritesh Harjani 提交者: Theodore Ts'o

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: NRitesh Harjani <riteshh@linux.ibm.com>
Reviewed-by: NJan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/8e5526ef14150778871ac7c937c8993c6a09cd3e.1644992610.git.riteshh@linux.ibm.comSigned-off-by: NTheodore Ts'o <tytso@mit.edu>
上级 8ac3939d
...@@ -1875,8 +1875,8 @@ bool ext4_fc_replay_check_excluded(struct super_block *sb, ext4_fsblk_t blk) ...@@ -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 || if (state->fc_regions[i].ino == 0 ||
state->fc_regions[i].len == 0) state->fc_regions[i].len == 0)
continue; continue;
if (blk >= state->fc_regions[i].pblk && if (in_range(blk, state->fc_regions[i].pblk,
blk < state->fc_regions[i].pblk + state->fc_regions[i].len) state->fc_regions[i].len))
return true; return true;
} }
return false; return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册