summaryrefslogtreecommitdiff
path: root/fs/btrfs
diff options
context:
space:
mode:
authorLi Zetao <lizetao1@huawei.com>2024-08-28 21:29:01 +0300
committerDavid Sterba <dsterba@suse.com>2024-09-10 17:51:21 +0300
commit08dd8507b11684427f5d0f07f18f1b1fb2d9f28a (patch)
treef376be6215bd51bbec5a30a2000502734edd99aa /fs/btrfs
parent135873258c6127077e2b0db83ddd08e3e4215b3b (diff)
downloadlinux-08dd8507b11684427f5d0f07f18f1b1fb2d9f28a.tar.xz
btrfs: convert submit_eb_page() 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. 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')
-rw-r--r--fs/btrfs/extent_io.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index f16c5be22849..14d2cc71fffd 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -1816,18 +1816,17 @@ static int submit_eb_subpage(struct folio *folio, struct writeback_control *wbc)
* previous call.
* Return <0 for fatal error.
*/
-static int submit_eb_page(struct page *page, struct btrfs_eb_write_context *ctx)
+static int submit_eb_page(struct folio *folio, struct btrfs_eb_write_context *ctx)
{
struct writeback_control *wbc = ctx->wbc;
- struct address_space *mapping = page->mapping;
- struct folio *folio = page_folio(page);
+ struct address_space *mapping = folio->mapping;
struct extent_buffer *eb;
int ret;
if (!folio_test_private(folio))
return 0;
- if (page_to_fs_info(page)->nodesize < PAGE_SIZE)
+ if (folio_to_fs_info(folio)->nodesize < PAGE_SIZE)
return submit_eb_subpage(folio, wbc);
spin_lock(&mapping->i_private_lock);
@@ -1926,7 +1925,7 @@ retry:
for (i = 0; i < nr_folios; i++) {
struct folio *folio = fbatch.folios[i];
- ret = submit_eb_page(&folio->page, &ctx);
+ ret = submit_eb_page(folio, &ctx);
if (ret == 0)
continue;
if (ret < 0) {