From: Ritesh Harjani <riteshh@linux.ibm.com>
To: yangerkun <yangerkun@huawei.com>, tytso@mit.edu, jack@suse.com
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: using matching invalidatepage in ext4_writepage
Date: Wed, 26 Feb 2020 15:49:52 +0530 [thread overview]
Message-ID: <20200226101953.A109911C05B@d06av25.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <20200226041002.13914-1-yangerkun@huawei.com>
On 2/26/20 9:40 AM, yangerkun wrote:
> Run generic/388 with journal data mode sometimes may trigger the warning
> in ext4_invalidatepage. Actually, we should use the matching invalidatepage
> in ext4_writepage.
>
> Signed-off-by: yangerkun <yangerkun@huawei.com>
generic/388 still fails, but the patch makes sense to me and also avoids
kernel warning.
Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com>
> ---
> fs/ext4/inode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index fa0ff78dc033..78e805d42ada 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -1974,7 +1974,7 @@ static int ext4_writepage(struct page *page,
> bool keep_towrite = false;
>
> if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb)))) {
> - ext4_invalidatepage(page, 0, PAGE_SIZE);
> + inode->i_mapping->a_ops->invalidatepage(page, 0, PAGE_SIZE);
> unlock_page(page);
> return -EIO;
> }
>
next prev parent reply other threads:[~2020-02-26 10:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-26 4:10 [PATCH] ext4: using matching invalidatepage in ext4_writepage yangerkun
2020-02-26 10:19 ` Ritesh Harjani [this message]
2020-02-26 12:03 ` Jan Kara
2020-03-16 10:44 ` yangerkun
2020-04-10 3:17 ` Theodore Y. Ts'o
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=20200226101953.A109911C05B@d06av25.portsmouth.uk.ibm.com \
--to=riteshh@linux.ibm.com \
--cc=jack@suse.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=yangerkun@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).