mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
btrfs: use a single if() statement for one outcome in get_block_rsv()
Rather than have three separate if() statements for the same outcome we should just OR them together in the same if() statement. Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
a099d0fdb3
commit
e9cf439f0d
1 changed files with 3 additions and 7 deletions
|
@ -4891,13 +4891,9 @@ static struct btrfs_block_rsv *get_block_rsv(
|
|||
{
|
||||
struct btrfs_block_rsv *block_rsv = NULL;
|
||||
|
||||
if (test_bit(BTRFS_ROOT_REF_COWS, &root->state))
|
||||
block_rsv = trans->block_rsv;
|
||||
|
||||
if (root == root->fs_info->csum_root && trans->adding_csums)
|
||||
block_rsv = trans->block_rsv;
|
||||
|
||||
if (root == root->fs_info->uuid_root)
|
||||
if (test_bit(BTRFS_ROOT_REF_COWS, &root->state) ||
|
||||
(root == root->fs_info->csum_root && trans->adding_csums) ||
|
||||
(root == root->fs_info->uuid_root))
|
||||
block_rsv = trans->block_rsv;
|
||||
|
||||
if (!block_rsv)
|
||||
|
|
Loading…
Reference in a new issue