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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211021152639.GB20319@twin.jikos.cz>
Date:   Thu, 21 Oct 2021 17:26:39 +0200
From:   David Sterba <dsterba@...e.cz>
To:     Qing Wang <wangqing@...o.com>
Cc:     Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
        David Sterba <dsterba@...e.com>, linux-btrfs@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] btrfs: simplify redundant logic judgment

On Wed, Oct 20, 2021 at 12:23:41AM -0700, Qing Wang wrote:
> From: Wang Qing <wangqing@...o.com>
> 
> A || (!A && B) is equal to A || B
> 
> Signed-off-by: Wang Qing <wangqing@...o.com>
> ---
>  fs/btrfs/inode.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
> index 07ba22dd..e0d2660
> --- a/fs/btrfs/inode.c
> +++ b/fs/btrfs/inode.c
> @@ -2011,8 +2011,7 @@ int btrfs_run_delalloc_range(struct btrfs_inode *inode, struct page *locked_page
>  		 * to use run_delalloc_nocow() here, like for  regular
>  		 * preallocated inodes.
>  		 */
> -		ASSERT(!zoned ||
> -		       (zoned && btrfs_is_data_reloc_root(inode->root)));
> +		ASSERT(!zoned || btrfs_is_data_reloc_root(inode->root));

Thanks, but somebody already sent such patch and we'd like to keep it as
it is for clarity.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ