Skip to content

Commit 1efc783

Browse files
chaseyuJaegeuk Kim
authored andcommitted
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/[email protected]/ Cc: Matthew Wilcox <[email protected]> Signed-off-by: Chao Yu <[email protected]> Reviewed-by: Li Zetao <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 3c86d1e commit 1efc783

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

fs/f2fs/compress.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,13 @@ bool f2fs_is_compressed_page(struct page *page)
9090
static void f2fs_set_compressed_page(struct page *page,
9191
struct inode *inode, pgoff_t index, void *data)
9292
{
93-
attach_page_private(page, (void *)data);
93+
struct folio *folio = page_folio(page);
94+
95+
folio_attach_private(folio, (void *)data);
9496

9597
/* i_crypto_info and iv index */
96-
page->index = index;
97-
page->mapping = inode->i_mapping;
98+
folio->index = index;
99+
folio->mapping = inode->i_mapping;
98100
}
99101

100102
static void f2fs_drop_rpages(struct compress_ctx *cc, int len, bool unlock)

0 commit comments

Comments
 (0)