ntfs3: stop using write_cache_pages
Subsystems (2)
PATCH 1/1 ntfs3: stop using write_cache_pages
Stop using the obsolete write_cache_pages and use writeback_iter directly.
Signed-off-by Christoph Hellwig <[email protected]>
--- fs/ntfs3/inode.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
fs/ntfs3/inode.c +10 -5
@@ -871,9 +871,9 @@ int ntfs_set_size(struct inode *inode, u64 new_size) }static int ntfs_resident_writepage (struct folio *folio, -struct writeback_control *wbc,void *data) +struct writeback_control *wbc) { -struct address_space *mapping = data; +struct address_space *mapping = folio->mapping;struct inode *inode = mapping->host;struct ntfs_inode *ni =ntfs_i (inode);int ret;
@@ -899,9 +899,14 @@ static int ntfs_writepages(struct address_space *mapping,if (unlikely (ntfs3_forced_shutdown (inode->i_sb)))return -EIO ; -if (is_resident (ntfs_i (inode))) -return write_cache_pages (mapping, wbc, ntfs_resident_writepage, - mapping); +if (is_resident (ntfs_i (inode))) { +struct folio *folio =NULL ; +int error; + +while ((folio =writeback_iter (mapping, wbc, folio, &error))) + error =ntfs_resident_writepage (folio, wbc); +return error; + }return mpage_writepages (mapping, wbc, ntfs_get_block); }
Signature · 1 line
2.47.2
Quoted 1 line · Christoph Hellwig
Stop using the obsolete
write_cache_pagesand usewriteback_iterdirectly.
Can this be reviewed and if ok applied, please? I want to kill of write_cache_pages soon.