aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChris Mason <clm@fb.com>2014-01-29 10:02:40 -0500
committerChris Mason <clm@fb.com>2014-01-29 10:06:31 -0500
commitcf93da7bcf450cb4595055d491a0519cb39e68ed (patch)
tree7c4f187c51baf3125b1b47ad0ef2ad1ee9c0efb9 /fs
parent90d3e592e99b8e374ead2b45148abf506493a959 (diff)
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/extent-tree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 73b55d94b953..9c9ecc93ae2c 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -5893,7 +5893,7 @@ static noinline int check_ref_cleanup(struct btrfs_trans_handle *trans,
5893 spin_lock(&delayed_refs->lock); 5893 spin_lock(&delayed_refs->lock);
5894 head = btrfs_find_delayed_ref_head(trans, bytenr); 5894 head = btrfs_find_delayed_ref_head(trans, bytenr);
5895 if (!head) 5895 if (!head)
5896 goto out; 5896 goto out_delayed_unlock;
5897 5897
5898 spin_lock(&head->lock); 5898 spin_lock(&head->lock);
5899 if (rb_first(&head->ref_root)) 5899 if (rb_first(&head->ref_root))
@@ -5942,6 +5942,8 @@ static noinline int check_ref_cleanup(struct btrfs_trans_handle *trans,
5942 return ret; 5942 return ret;
5943out: 5943out:
5944 spin_unlock(&head->lock); 5944 spin_unlock(&head->lock);
5945
5946out_delayed_unlock:
5945 spin_unlock(&delayed_refs->lock); 5947 spin_unlock(&delayed_refs->lock);
5946 return 0; 5948 return 0;
5947} 5949}