1
0
Fork 0

Btrfs: fix spin_unlock in check_ref_cleanup

Our goto out should have gone a little farther.

Signed-off-by: Chris Mason <clm@fb.com>
hifive-unleashed-5.1
Chris Mason 2014-01-29 07:02:40 -08:00
parent 90d3e592e9
commit cf93da7bcf
1 changed files with 3 additions and 1 deletions

View File

@ -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))
@ -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;
}