You need to sign in or sign up before continuing.
提交 c1b07854 编写于 作者: P Peng Hao 提交者: David Sterba

btrfs: simplify cleanup after error in btrfs_create_tree

Since leaf is already NULL, and no other branch will go to fail_unlock,
the fail_unlock label is useless and can be removed
Signed-off-by: NPeng Hao <flyingpeng@tencent.com>
Reviewed-by: NDavid Sterba <dsterba@suse.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 e5e886ba
......@@ -1197,7 +1197,7 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,
if (IS_ERR(leaf)) {
ret = PTR_ERR(leaf);
leaf = NULL;
goto fail_unlock;
goto fail;
}
root->node = leaf;
......@@ -1232,9 +1232,6 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,
return root;
fail_unlock:
if (leaf)
btrfs_tree_unlock(leaf);
fail:
btrfs_put_root(root);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册