public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Matthew Wilcox <willy@infradead.org>, Jan Kara <jack@suse.com>,
	Dave Kleikamp <shaggy@kernel.org>,
	Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Cc: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	jfs-discussion@lists.sourceforge.net, ntfs3@lists.linux.dev
Subject: [PATCH 5/6] fs: don't call ->writepage from __mpage_writepage
Date: Mon, 13 Jun 2022 07:37:14 +0200	[thread overview]
Message-ID: <20220613053715.2394147-6-hch@lst.de> (raw)
In-Reply-To: <20220613053715.2394147-1-hch@lst.de>

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>
---
 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


  parent reply	other threads:[~2022-06-13  5:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13  5:37 remove the nobh helpers v2 Christoph Hellwig
2022-06-13  5:37 ` [PATCH 1/6] ntfs3: refactor ntfs_writepages Christoph Hellwig
2022-06-13 10:46   ` Jan Kara
2022-06-13  5:37 ` [PATCH 2/6] ext2: remove nobh support Christoph Hellwig
2022-06-13  5:37 ` [PATCH 3/6] jfs: stop using the nobh helper Christoph Hellwig
2022-06-13  5:37 ` [PATCH 4/6] fs: remove the nobh helpers Christoph Hellwig
2022-06-13  5:37 ` Christoph Hellwig [this message]
2022-06-13 10:53   ` [PATCH 5/6] fs: don't call ->writepage from __mpage_writepage Jan Kara
2022-06-13  5:37 ` [PATCH 6/6] fs: remove the NULL get_block case in mpage_writepages Christoph Hellwig
2022-06-13 10:53   ` Jan Kara
2022-06-19 15:46 ` remove the nobh helpers v2 Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220613053715.2394147-6-hch@lst.de \
    --to=hch@lst.de \
    --cc=almaz.alexandrovich@paragon-software.com \
    --cc=jack@suse.com \
    --cc=jfs-discussion@lists.sourceforge.net \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ntfs3@lists.linux.dev \
    --cc=shaggy@kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox