mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-10 03:15:21 +02:00
UPSTREAM: f2fs: convert f2fs_write_data_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>
Change-Id: I2181530f5b8741d1f106ce0d7288210c1d8b9db3
Signed-off-by: Chao Yu <chao@kernel.org>
Reviewed-by: Li Zetao <lizetao1@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit 2ac0aa31a1
)
This commit is contained in:
parent
80064f1aea
commit
097af71193
|
@ -2967,22 +2967,23 @@ redirty_out:
|
|||
static int f2fs_write_data_page(struct page *page,
|
||||
struct writeback_control *wbc)
|
||||
{
|
||||
struct folio *folio = page_folio(page);
|
||||
#ifdef CONFIG_F2FS_FS_COMPRESSION
|
||||
struct inode *inode = page->mapping->host;
|
||||
struct inode *inode = folio->mapping->host;
|
||||
|
||||
if (unlikely(f2fs_cp_error(F2FS_I_SB(inode))))
|
||||
goto out;
|
||||
|
||||
if (f2fs_compressed_file(inode)) {
|
||||
if (f2fs_is_compressed_cluster(inode, page->index)) {
|
||||
redirty_page_for_writepage(wbc, page);
|
||||
if (f2fs_is_compressed_cluster(inode, folio->index)) {
|
||||
folio_redirty_for_writepage(wbc, folio);
|
||||
return AOP_WRITEPAGE_ACTIVATE;
|
||||
}
|
||||
}
|
||||
out:
|
||||
#endif
|
||||
|
||||
return f2fs_write_single_data_page(page_folio(page), NULL, NULL, NULL,
|
||||
return f2fs_write_single_data_page(folio, NULL, NULL, NULL,
|
||||
wbc, FS_DATA_IO, 0, true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user