mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 23:21:31 +00:00
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>
This commit is contained in:
parent
60021bd754
commit
9435be734a
@ -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) ||
|
||||
|
Loading…
Reference in New Issue
Block a user