summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorHaowen Bai <baihaowen@meizu.com>2022-03-23 04:45:58 +0300
committerDavid Sterba <dsterba@suse.com>2022-04-06 01:49:09 +0300
commit9435be734ae9de020072bd4443d46e02d92564d1 (patch)
treefa102b9830b426b2208a0e946b7f8a50faca504a /fs
parent60021bd754c6ca0addc6817994f20290a321d8d6 (diff)
downloadlinux-9435be734ae9de020072bd4443d46e02d92564d1.tar.xz
btrfs: zoned: remove redundant condition in btrfs_run_delalloc_range
The logic !A || A && B is equivalent to !A || B. so we can make code clear. Note: though it's preferred to be in the more human readable form, there have been repeated reports and patches as the expression is detected by tools so apply it to reduce the load. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Haowen Bai <baihaowen@meizu.com> Reviewed-by: David Sterba <dsterba@suse.com> [ add note ] Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/inode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 5aab6af88349..286ab7c27db0 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2016,8 +2016,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) ||