summaryrefslogtreecommitdiff
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
authorQianfeng Rong <rongqianfeng@vivo.com>2025-06-19 18:15:01 +0800
committerDavid Sterba <dsterba@suse.com>2025-07-21 23:58:03 +0200
commitc9da22428e09de83b1c301339a97cc14caf93b7a (patch)
treed6a2bd4dcec50e06216a94050be70c679bbbd2aa /fs/btrfs/file.c
parent23a6abdadaa3114e74d2c0350ad7f2b50da7c841 (diff)
btrfs: use folio_next_index() helper in check_range_has_page()
Simplify code pattern of 'folio->index + folio_nr_pages(folio)' by using the existing helper folio_next_index(). Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r--fs/btrfs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 082630562838..247676f34f2e 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -2194,7 +2194,7 @@ static bool check_range_has_page(struct inode *inode, u64 start, u64 end)
if (folio->index < start_index)
continue;
/* A large folio extends beyond the end. Not a target. */
- if (folio->index + folio_nr_pages(folio) > end_index)
+ if (folio_next_index(folio) > end_index)
continue;
/* A folio doesn't cover the head/tail index. Found a target. */
ret = true;