summaryrefslogtreecommitdiff
path: root/fs/f2fs
diff options
context:
space:
mode:
authorChao Yu <chao@kernel.org>2024-08-20 22:55:02 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2024-09-06 23:04:48 +0000
commit1efc78310c9d25bdc2020202a50c012025602dd3 (patch)
tree71c5e88a6affaf08266d56b67e8aa2be4de1b42f /fs/f2fs
parent3c86d1eec7891c53ea9c71d7a2970c248413a855 (diff)
f2fs: convert f2fs_set_compressed_page() to use folio
Convert to use folio, so that we can get rid of 'page->index' to prepare for removal of 'index' field in structure page [1]. [1] https://lore.kernel.org/all/Zp8fgUSIBGQ1TN0D@casper.infradead.org/ Cc: Matthew Wilcox <willy@infradead.org> Signed-off-by: Chao Yu <chao@kernel.org> Reviewed-by: Li Zetao <lizetao1@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/compress.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index 630bb78655d5..e642c869db4a 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -90,11 +90,13 @@ bool f2fs_is_compressed_page(struct page *page)
static void f2fs_set_compressed_page(struct page *page,
struct inode *inode, pgoff_t index, void *data)
{
- attach_page_private(page, (void *)data);
+ struct folio *folio = page_folio(page);
+
+ folio_attach_private(folio, (void *)data);
/* i_crypto_info and iv index */
- page->index = index;
- page->mapping = inode->i_mapping;
+ folio->index = index;
+ folio->mapping = inode->i_mapping;
}
static void f2fs_drop_rpages(struct compress_ctx *cc, int len, bool unlock)