ntfs3: stop using write_cache_pages

Patch series "remove write_cache_pages()".

Kill off write_cache_pages() after converting the last two users to the
iterator.


This patch (of 3):

Stop using the obsolete write_cache_pages and use writeback_iter directly.

Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Christoph Hellwig <[email protected]>
Cc: Kent Overstreet <[email protected]>
Cc: Konstantin Komarov <[email protected]>
Cc: Matthew Wilcox (Oracle) <[email protected]>
Cc: David Hildenbrand <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
This commit is contained in:
Christoph Hellwig authored and Andrew Morton committed 2025-09-13 16:55:13 -07:00
1 parent 1aca4021f8
commit 8d4bb46ba7
1 file changed
+10 -5
+10 -5
View File
@@ -871,9 +871,9 @@ out:
}
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;
@@ -907,9 +907,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);
}