aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
authorMatthew Wilcox (Oracle) <willy@infradead.org>2026-05-22 19:14:08 +0100
committerDavid Sterba <dsterba@suse.com>2026-05-26 16:35:03 +0200
commitd0929961c2120e654b9e8c1fcb8094ac605ad16a (patch)
tree6f59b6fee3d93ae1562b015c84d63c1ebaf8b998 /fs
parentd092d1ee5c3d253daeaa3211769cb0d32187d487 (diff)
downloadlinux-next-history-d0929961c2120e654b9e8c1fcb8094ac605ad16a.tar.gz
btrfs: replace __free_page with folio_put() in attach_eb_folio_to_filemap()
Calling __free_page() on folio_page() happens to work today, but won't always. Besides, it's far simpler to call folio_put(). Reviewed-by: Boris Burkov <boris@bur.io> Reviewed-by: Qu Wenruo <wqu@suse.com> Tested-by: Boris Burkov <boris@bur.io> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/extent_io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index b03eb211def70..b7e3e83838d80 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3400,8 +3400,8 @@ retry:
finish:
spin_lock(&mapping->i_private_lock);
if (existing_folio && btrfs_meta_is_subpage(fs_info)) {
- /* We're going to reuse the existing page, can drop our folio now. */
- __free_page(folio_page(eb->folios[i], 0));
+ /* We're going to reuse the existing folio, can drop our folio now. */
+ folio_put(eb->folios[i]);
eb->folios[i] = existing_folio;
} else if (existing_folio) {
struct extent_buffer *existing_eb;
@@ -3416,7 +3416,7 @@ finish:
return 1;
}
/* The extent buffer no longer exists, we can reuse the folio. */
- __free_page(folio_page(eb->folios[i], 0));
+ folio_put(eb->folios[i]);
eb->folios[i] = existing_folio;
}
eb->folio_size = folio_size(eb->folios[i]);