提交 e9cf439f 编写于 作者: A Alexandru Moise 提交者: David Sterba

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: NDavid Sterba <dsterba@suse.com>
Signed-off-by: NAlexandru Moise <00moses.alexander00@gmail.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 a099d0fd
...@@ -4891,13 +4891,9 @@ static struct btrfs_block_rsv *get_block_rsv( ...@@ -4891,13 +4891,9 @@ static struct btrfs_block_rsv *get_block_rsv(
{ {
struct btrfs_block_rsv *block_rsv = NULL; struct btrfs_block_rsv *block_rsv = NULL;
if (test_bit(BTRFS_ROOT_REF_COWS, &root->state)) if (test_bit(BTRFS_ROOT_REF_COWS, &root->state) ||
block_rsv = trans->block_rsv; (root == root->fs_info->csum_root && trans->adding_csums) ||
(root == root->fs_info->uuid_root))
if (root == root->fs_info->csum_root && trans->adding_csums)
block_rsv = trans->block_rsv;
if (root == root->fs_info->uuid_root)
block_rsv = trans->block_rsv; block_rsv = trans->block_rsv;
if (!block_rsv) if (!block_rsv)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册