]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
fs: don't call ->writepage from __mpage_writepage
authorChristoph Hellwig <hch@lst.de>
Mon, 13 Jun 2022 05:37:14 +0000 (07:37 +0200)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 2 Aug 2022 16:34:04 +0000 (12:34 -0400)
All callers of mpage_writepage use block_write_full_page as their
->writepage implementation when called from mpage_writepages
(although for ntfs3 this is obsfucated a bit).

Just call block_write_full_page directly instead of going through
the ->writepage indirection.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
fs/mpage.c

index b7e0b7fbb41f203cce0de69625285ebdaee875ee..bf7d1cf621e2f843888b33f59c0179193403fe3f 100644 (file)
@@ -626,7 +626,7 @@ confused:
        /*
         * The caller has a ref on the inode, so *mapping is stable
         */
-       ret = mapping->a_ops->writepage(page, wbc);
+       ret = block_write_full_page(page, mpd->get_block, wbc);
        mapping_set_error(mapping, ret);
 out:
        mpd->bio = bio;