Skip to content

Commit

Permalink
fs: don't call ->writepage from __mpage_writepage
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Matthew Wilcox (Oracle) committed Jul 9, 2022
1 parent 215e71b commit cf95d50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/mpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ static int __mpage_writepage(struct page *page, struct writeback_control *wbc,
/*
* 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;
Expand Down

0 comments on commit cf95d50

Please sign in to comment.