Message ID | 20220608150451.1432388-5-hch@lst.de |
---|---|
State | Not Applicable |
Headers | show |
Series | [1/5] ext2: remove nobh support | expand |
On Wed 08-06-22 17:04:50, Christoph Hellwig wrote: > All callers of mpage_writepage use block_write_full_page as their > ->writepage implementation, so hard code that. > > Signed-off-by: Christoph Hellwig <hch@lst.de> Similarly here NTFS (fs/ntfs3/) seems to have some non-trivial stuff besides block_write_full_page()... Honza > --- > fs/mpage.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/mpage.c b/fs/mpage.c > index 31a97a0acf5f5..a354ef2b4b4eb 100644 > --- a/fs/mpage.c > +++ b/fs/mpage.c > @@ -624,7 +624,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; > -- > 2.30.2 >
On Thu, Jun 09, 2022 at 07:31:19PM +0200, Jan Kara wrote: > On Wed 08-06-22 17:04:50, Christoph Hellwig wrote: > > All callers of mpage_writepage use block_write_full_page as their > > ->writepage implementation, so hard code that. > > > > Signed-off-by: Christoph Hellwig <hch@lst.de> > > Similarly here NTFS (fs/ntfs3/) seems to have some non-trivial stuff besides > block_write_full_page()... Indeed, ntfs3 will need a prep patch to unwind this mess. Thanks for catching this!
diff --git a/fs/mpage.c b/fs/mpage.c index 31a97a0acf5f5..a354ef2b4b4eb 100644 --- a/fs/mpage.c +++ b/fs/mpage.c @@ -624,7 +624,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;
All callers of mpage_writepage use block_write_full_page as their ->writepage implementation, so hard code that. Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/mpage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)