From: Joseph Qi <jiangqi903@gmail.com>
To: riteshh <riteshh@linux.ibm.com>, Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: tytso@mit.edu, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: remove redundant check buffer_uptodate()
Date: Mon, 26 Apr 2021 14:15:44 +0800 [thread overview]
Message-ID: <4314943d-b39b-3f00-2b60-41756e6675f3@gmail.com> (raw)
In-Reply-To: <20210426050545.m3fbtlwdf32lgqvu@riteshh-domain>
On 4/26/21 1:05 PM, riteshh wrote:
> On 21/04/26 11:23AM, Joseph Qi wrote:
>> Now set_buffer_uptodate() will test first and then set, so we don't have
>> to check buffer_uptodate() first, remove it to simplify code.
>
> Maybe we can change below function as well then.
> No need to check same thing twice since set_buffer_uptodate() is already doing
> the check.
> diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> index b258e8279266..856bd9981409 100644
> --- a/fs/ext4/ext4.h
> +++ b/fs/ext4/ext4.h
> @@ -3749,7 +3749,7 @@ static inline int ext4_buffer_uptodate(struct buffer_head *bh)
> * have to read the block because we may read the old data
> * successfully.
> */
> - if (!buffer_uptodate(bh) && buffer_write_io_error(bh))
> + if (buffer_write_io_error(bh))
> set_buffer_uptodate(bh);
> return buffer_uptodate(bh);
> }
>
> With that pls feel free to add:
> Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com>
>
Sure, will send v2 with above addressed.
Thanks,
Joseph
prev parent reply other threads:[~2021-04-26 6:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-26 3:23 [PATCH] ext4: remove redundant check buffer_uptodate() Joseph Qi
2021-04-26 5:05 ` riteshh
2021-04-26 6:15 ` Joseph Qi [this message]
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=4314943d-b39b-3f00-2b60-41756e6675f3@gmail.com \
--to=jiangqi903@gmail.com \
--cc=adilger.kernel@dilger.ca \
--cc=joseph.qi@linux.alibaba.com \
--cc=linux-ext4@vger.kernel.org \
--cc=riteshh@linux.ibm.com \
--cc=tytso@mit.edu \
/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