[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1634714621-58190-1-git-send-email-wangqing@vivo.com>
Date: Wed, 20 Oct 2021 00:23:41 -0700
From: Qing Wang <wangqing@...o.com>
To: Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>, linux-btrfs@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Wang Qing <wangqing@...o.com>
Subject: [PATCH] btrfs: simplify redundant logic judgment
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));
ret = run_delalloc_nocow(inode, locked_page, start, end,
page_started, nr_written);
} else if (!inode_can_compress(inode) ||
--
2.7.4
Powered by blists - more mailing lists