btrfs: convert defrag_prepare_one_page() to use a folio
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 14 Dec 2023 16:13:30 +0000 (16:13 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 4 Mar 2024 15:24:45 +0000 (16:24 +0100)
commit03fbf77a2c963d5b8173edc56d995465fb6fb38c
treef7d3de6be43cc0d2729150f82dca51437aca9794
parentdfba9f47730604a46c284f6099a11c5686b6289d
btrfs: convert defrag_prepare_one_page() to use a folio

Use a folio throughout defrag_prepare_one_page() to remove dozens of
hidden calls to compound_head().  There is no support here for large
folios; indeed, turn the existing check for PageCompound into a check
for large folios.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/defrag.c