f2fs: Remove f2fs_write_data_page()
Mappings which implement writepages should not implement writepage as it can only harm writeback patterns. 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:
committed by
Jaegeuk Kim
parent
448a834f89
commit
6ad3ddbee8
@@ -2935,29 +2935,6 @@ redirty_out:
|
||||
return err;
|
||||
}
|
||||
|
||||
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 = 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, folio->index)) {
|
||||
folio_redirty_for_writepage(wbc, folio);
|
||||
return AOP_WRITEPAGE_ACTIVATE;
|
||||
}
|
||||
}
|
||||
out:
|
||||
#endif
|
||||
|
||||
return f2fs_write_single_data_page(folio, NULL, NULL, NULL,
|
||||
wbc, FS_DATA_IO, 0, true);
|
||||
}
|
||||
|
||||
/*
|
||||
* This function was copied from write_cache_pages from mm/page-writeback.c.
|
||||
* The major change is making write step of cold data page separately from
|
||||
@@ -4111,7 +4088,6 @@ static void f2fs_swap_deactivate(struct file *file)
|
||||
const struct address_space_operations f2fs_dblock_aops = {
|
||||
.read_folio = f2fs_read_data_folio,
|
||||
.readahead = f2fs_readahead,
|
||||
.writepage = f2fs_write_data_page,
|
||||
.writepages = f2fs_write_data_pages,
|
||||
.write_begin = f2fs_write_begin,
|
||||
.write_end = f2fs_write_end,
|
||||
|
||||
Reference in New Issue
Block a user