Skip to content

Commit 08dd850

Browse files
Li Zetaokdave
authored andcommitted
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 <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 1358732 commit 08dd850

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

fs/btrfs/extent_io.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1816,18 +1816,17 @@ static int submit_eb_subpage(struct folio *folio, struct writeback_control *wbc)
18161816
* previous call.
18171817
* Return <0 for fatal error.
18181818
*/
1819-
static int submit_eb_page(struct page *page, struct btrfs_eb_write_context *ctx)
1819+
static int submit_eb_page(struct folio *folio, struct btrfs_eb_write_context *ctx)
18201820
{
18211821
struct writeback_control *wbc = ctx->wbc;
1822-
struct address_space *mapping = page->mapping;
1823-
struct folio *folio = page_folio(page);
1822+
struct address_space *mapping = folio->mapping;
18241823
struct extent_buffer *eb;
18251824
int ret;
18261825

18271826
if (!folio_test_private(folio))
18281827
return 0;
18291828

1830-
if (page_to_fs_info(page)->nodesize < PAGE_SIZE)
1829+
if (folio_to_fs_info(folio)->nodesize < PAGE_SIZE)
18311830
return submit_eb_subpage(folio, wbc);
18321831

18331832
spin_lock(&mapping->i_private_lock);
@@ -1926,7 +1925,7 @@ int btree_write_cache_pages(struct address_space *mapping,
19261925
for (i = 0; i < nr_folios; i++) {
19271926
struct folio *folio = fbatch.folios[i];
19281927

1929-
ret = submit_eb_page(&folio->page, &ctx);
1928+
ret = submit_eb_page(folio, &ctx);
19301929
if (ret == 0)
19311930
continue;
19321931
if (ret < 0) {

0 commit comments

Comments
 (0)