diff options
author | Li Zetao <lizetao1@huawei.com> | 2024-08-29 02:29:02 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-09-10 16:51:21 +0200 |
commit | dd0a8df455665fe896125e15dfe3847f1e18462f (patch) | |
tree | 9b81ae0717de9f56d72ce4e4577c608a7adfbdd5 /fs/btrfs/extent_io.c | |
parent | 08dd8507b11684427f5d0f07f18f1b1fb2d9f28a (diff) |
btrfs: convert try_release_extent_state() to take a folio
The old page API is being gradually replaced and converted to use folio
to improve code readability and avoid repeated conversion between page
and folio. Moreover, use folio_pos() instead of page_offset(),
which is more consistent with folio usage.
Signed-off-by: Li Zetao <lizetao1@huawei.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 14d2cc71fffd..430dc1b9de32 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2303,9 +2303,9 @@ int extent_invalidate_folio(struct extent_io_tree *tree, * to drop the page. */ static bool try_release_extent_state(struct extent_io_tree *tree, - struct page *page, gfp_t mask) + struct folio *folio, gfp_t mask) { - u64 start = page_offset(page); + u64 start = folio_pos(folio); u64 end = start + PAGE_SIZE - 1; bool ret; @@ -2414,7 +2414,7 @@ next: cond_resched(); } } - return try_release_extent_state(io_tree, page, mask); + return try_release_extent_state(io_tree, folio, mask); } static void __free_extent_buffer(struct extent_buffer *eb) |