* [PATCH] ntfs3: stop using write_cache_pages
@ 2025-07-11 8:11 Christoph Hellwig
2025-07-23 6:11 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2025-07-11 8:11 UTC (permalink / raw)
To: almaz.alexandrovich; +Cc: ntfs3, linux-fsdevel
Stop using the obsolete write_cache_pages and use writeback_iter directly.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/ntfs3/inode.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c
index 0f0d27d4644a..0a6a7a343aa1 100644
--- a/fs/ntfs3/inode.c
+++ b/fs/ntfs3/inode.c
@@ -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);
}
--
2.47.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-23 6:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-11 8:11 [PATCH] ntfs3: stop using write_cache_pages Christoph Hellwig
2025-07-23 6:11 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox