f2fs: Use a folio in f2fs_compress_free_page()

Convert the incoming page to a folio and operate on it.  Removes a
reference to page->mapping which is going away soon.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Matthew Wilcox (Oracle) 2025-03-31 21:10:21 +01:00 committed by Jaegeuk Kim
parent 42cb74a92a
commit a8cb9b3d9b

View File

@ -593,11 +593,14 @@ static struct page *f2fs_compress_alloc_page(void)
static void f2fs_compress_free_page(struct page *page)
{
struct folio *folio;
if (!page)
return;
detach_page_private(page);
page->mapping = NULL;
unlock_page(page);
folio = page_folio(page);
folio_detach_private(folio);
folio->mapping = NULL;
folio_unlock(folio);
mempool_free(page, compress_page_pool);
}