]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
f2fs: Use a folio in f2fs_compress_free_page()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 31 Mar 2025 20:10:21 +0000 (21:10 +0100)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 28 Apr 2025 15:18:03 +0000 (15:18 +0000)
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>
fs/f2fs/compress.c

index 9b94810675c19312433f365bf451c058189ef856..9eecc167b1fc2dfcca831164f6cc2dffb1a3f62c 100644 (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);
 }