ocfs2-devel.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: Wan Jiabing <wanjiabing@vivo.com>, Mark Fasheh <mark@fasheh.com>,
	Joel Becker <jlbec@evilplan.org>,
	ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org,
	akpm <akpm@linux-foundation.org>
Cc: kael_w@yeah.net
Subject: Re: [Ocfs2-devel] [PATCH] ocfs2: Remove repeated uptodate check for buffer
Date: Sun, 25 Apr 2021 14:20:42 +0800	[thread overview]
Message-ID: <d48872a7-753d-9c6e-c69b-4ea4c5c8efaa@linux.alibaba.com> (raw)
In-Reply-To: <20210425025702.13628-1-wanjiabing@vivo.com>



On 4/25/21 10:57 AM, Wan Jiabing wrote:
> In commit 60f91826ca62 ("buffer: Avoid setting buffer bits that are
> already set"), function set_buffer_##name was added a test_bit() to
> check buffer, which is the same as function buffer_##name.
> The !buffer_uptodate(bh) here is a repeated check. Remove it.
> 
> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>

Looks good.
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>

> ---
>  fs/ocfs2/aops.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
> index ad20403b383f..bd039fdbb27e 100644
> --- a/fs/ocfs2/aops.c
> +++ b/fs/ocfs2/aops.c
> @@ -634,8 +634,7 @@ int ocfs2_map_page_blocks(struct page *page, u64 *p_blkno,
>  		}
>  
>  		if (PageUptodate(page)) {
> -			if (!buffer_uptodate(bh))
> -				set_buffer_uptodate(bh);
> +			set_buffer_uptodate(bh);
>  		} else if (!buffer_uptodate(bh) && !buffer_delay(bh) &&
>  			   !buffer_new(bh) &&
>  			   ocfs2_should_read_blk(inode, page, block_start) &&
> 

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

      reply	other threads:[~2021-04-25  6:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-25  2:57 [Ocfs2-devel] [PATCH] ocfs2: Remove repeated uptodate check for buffer Wan Jiabing
2021-04-25  6:20 ` 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=d48872a7-753d-9c6e-c69b-4ea4c5c8efaa@linux.alibaba.com \
    --to=joseph.qi@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=jlbec@evilplan.org \
    --cc=kael_w@yeah.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark@fasheh.com \
    --cc=ocfs2-devel@oss.oracle.com \
    --cc=wanjiabing@vivo.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).