From: Jan Kara <jack@suse.cz>
To: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox <willy@infradead.org>, Jan Kara <jack@suse.com>,
Dave Kleikamp <shaggy@kernel.org>,
Konstantin Komarov <almaz.alexandrovich@paragon-software.com>,
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: Re: [PATCH 1/6] ntfs3: refactor ntfs_writepages
Date: Mon, 13 Jun 2022 12:46:47 +0200 [thread overview]
Message-ID: <20220613104647.wjt27tqijdou3vm4@quack3.lan> (raw)
In-Reply-To: <20220613053715.2394147-2-hch@lst.de>
On Mon 13-06-22 07:37:10, Christoph Hellwig wrote:
> Handle the resident case with an explicit generic_writepages call instead
> of using the obscure overload that makes mpage_writepages with a NULL
> get_block do the same thing.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Yeah, much more obvious :). Feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> fs/ntfs3/inode.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c
> index be4ebdd8048b0..28c09c25b823d 100644
> --- a/fs/ntfs3/inode.c
> +++ b/fs/ntfs3/inode.c
> @@ -851,12 +851,10 @@ static int ntfs_writepage(struct page *page, struct writeback_control *wbc)
> static int ntfs_writepages(struct address_space *mapping,
> struct writeback_control *wbc)
> {
> - struct inode *inode = mapping->host;
> - struct ntfs_inode *ni = ntfs_i(inode);
> /* Redirect call to 'ntfs_writepage' for resident files. */
> - get_block_t *get_block = is_resident(ni) ? NULL : &ntfs_get_block;
> -
> - return mpage_writepages(mapping, wbc, get_block);
> + if (is_resident(ntfs_i(mapping->host)))
> + return generic_writepages(mapping, wbc);
> + return mpage_writepages(mapping, wbc, ntfs_get_block);
> }
>
> static int ntfs_get_block_write_begin(struct inode *inode, sector_t vbn,
> --
> 2.30.2
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2022-06-13 11:32 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 [this message]
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 ` [PATCH 5/6] fs: don't call ->writepage from __mpage_writepage Christoph Hellwig
2022-06-13 10:53 ` 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=20220613104647.wjt27tqijdou3vm4@quack3.lan \
--to=jack@suse.cz \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=hch@lst.de \
--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