Skip to content

Commit

Permalink
Btrfs: fix spin_unlock in check_ref_cleanup
Browse files Browse the repository at this point in the history
Our goto out should have gone a little farther.

Signed-off-by: Chris Mason <[email protected]>
  • Loading branch information
masoncl committed Jan 29, 2014
1 parent 90d3e59 commit cf93da7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -5893,7 +5893,7 @@ static noinline int check_ref_cleanup(struct btrfs_trans_handle *trans,
spin_lock(&delayed_refs->lock);
head = btrfs_find_delayed_ref_head(trans, bytenr);
if (!head)
goto out;
goto out_delayed_unlock;

spin_lock(&head->lock);
if (rb_first(&head->ref_root))
Expand Down Expand Up @@ -5942,6 +5942,8 @@ static noinline int check_ref_cleanup(struct btrfs_trans_handle *trans,
return ret;
out:
spin_unlock(&head->lock);

out_delayed_unlock:
spin_unlock(&delayed_refs->lock);
return 0;
}
Expand Down

0 comments on commit cf93da7

Please sign in to comment.