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]
Date:   Mon, 24 May 2021 11:01:23 +0200
From:   Jan Kara <jack@...e.cz>
To:     YueHaibing <yuehaibing@...wei.com>
Cc:     jack@...e.cz, reiserfs-devel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] reiserfs: Remove unneed check in
 reiserfs_write_full_page()

On Sun 23-05-21 17:02:58, YueHaibing wrote:
> Condition !A || A && B is equivalent to !A || B.
> 
> Generated by: scripts/coccinelle/misc/excluded_middle.cocci
> 
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>

Fair enough. Thanks for the patch. Added to my tree.

								Honza

> ---
>  fs/reiserfs/inode.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
> index 780bb90c1804..f49b72ccac4c 100644
> --- a/fs/reiserfs/inode.c
> +++ b/fs/reiserfs/inode.c
> @@ -2584,9 +2584,7 @@ static int reiserfs_write_full_page(struct page *page,
>  			clear_buffer_dirty(bh);
>  			set_buffer_uptodate(bh);
>  		} else if ((checked || buffer_dirty(bh)) &&
> -		           (!buffer_mapped(bh) || (buffer_mapped(bh)
> -						       && bh->b_blocknr ==
> -						       0))) {
> +			   (!buffer_mapped(bh) || bh->b_blocknr == 0)) {
>  			/*
>  			 * not mapped yet, or it points to a direct item, search
>  			 * the btree for the mapping info, and log any direct
> -- 
> 2.20.1
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ