Skip to content

Commit 7d46063

Browse files
Christoph Hellwigaalexandrovich
authored andcommitted
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]> Signed-off-by: Konstantin Komarov <[email protected]>
1 parent 0dc7117 commit 7d46063

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

fs/ntfs3/inode.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -872,9 +872,9 @@ int ntfs_set_size(struct inode *inode, u64 new_size)
872872
}
873873

874874
static int ntfs_resident_writepage(struct folio *folio,
875-
struct writeback_control *wbc, void *data)
875+
struct writeback_control *wbc)
876876
{
877-
struct address_space *mapping = data;
877+
struct address_space *mapping = folio->mapping;
878878
struct inode *inode = mapping->host;
879879
struct ntfs_inode *ni = ntfs_i(inode);
880880
int ret;
@@ -908,9 +908,14 @@ static int ntfs_writepages(struct address_space *mapping,
908908
if (unlikely(ntfs3_forced_shutdown(inode->i_sb)))
909909
return -EIO;
910910

911-
if (is_resident(ntfs_i(inode)))
912-
return write_cache_pages(mapping, wbc, ntfs_resident_writepage,
913-
mapping);
911+
if (is_resident(ntfs_i(inode))) {
912+
struct folio *folio = NULL;
913+
int error;
914+
915+
while ((folio = writeback_iter(mapping, wbc, folio, &error)))
916+
error = ntfs_resident_writepage(folio, wbc);
917+
return error;
918+
}
914919
return mpage_writepages(mapping, wbc, ntfs_get_block);
915920
}
916921

0 commit comments

Comments
 (0)