提交 cf93da7b 编写于 作者: C Chris Mason

Btrfs: fix spin_unlock in check_ref_cleanup

Our goto out should have gone a little farther.
Signed-off-by: NChris Mason <clm@fb.com>
上级 90d3e592
...@@ -5893,7 +5893,7 @@ static noinline int check_ref_cleanup(struct btrfs_trans_handle *trans, ...@@ -5893,7 +5893,7 @@ static noinline int check_ref_cleanup(struct btrfs_trans_handle *trans,
spin_lock(&delayed_refs->lock); spin_lock(&delayed_refs->lock);
head = btrfs_find_delayed_ref_head(trans, bytenr); head = btrfs_find_delayed_ref_head(trans, bytenr);
if (!head) if (!head)
goto out; goto out_delayed_unlock;
spin_lock(&head->lock); spin_lock(&head->lock);
if (rb_first(&head->ref_root)) if (rb_first(&head->ref_root))
...@@ -5942,6 +5942,8 @@ static noinline int check_ref_cleanup(struct btrfs_trans_handle *trans, ...@@ -5942,6 +5942,8 @@ static noinline int check_ref_cleanup(struct btrfs_trans_handle *trans,
return ret; return ret;
out: out:
spin_unlock(&head->lock); spin_unlock(&head->lock);
out_delayed_unlock:
spin_unlock(&delayed_refs->lock); spin_unlock(&delayed_refs->lock);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册