lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d48872a7-753d-9c6e-c69b-4ea4c5c8efaa@linux.alibaba.com>
Date:   Sun, 25 Apr 2021 14:20:42 +0800
From:   Joseph Qi <joseph.qi@...ux.alibaba.com>
To:     Wan Jiabing <wanjiabing@...o.com>, Mark Fasheh <mark@...heh.com>,
        Joel Becker <jlbec@...lplan.org>, ocfs2-devel@....oracle.com,
        linux-kernel@...r.kernel.org, akpm <akpm@...ux-foundation.org>
Cc:     kael_w@...h.net
Subject: Re: [PATCH] ocfs2: Remove repeated uptodate check for buffer



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@...o.com>

Looks good.
Reviewed-by: Joseph Qi <joseph.qi@...ux.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) &&
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ