aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2012-12-28 04:33:19 -0500
committerJosef Bacik <josef@toxicpanda.com>2013-01-14 13:52:53 -0500
commit3268a2468eb6a31af89930cbae58a62fe6ca6d2d (patch)
treec8385d5ea8b3e27da7ec1d46a030a1f4f74b9bb6
parentac5c93005b7073732e268606688fb6c821d5310e (diff)
Btrfs: reset path lock state to zero
We forgot to reset the path lock state to zero after we unlock the path block, and this can lead to the ASSERT checker in tree unlock API. Reported-by: Slava Barinov <rayslava@gmail.com> Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
-rw-r--r--fs/btrfs/extent-tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index aeba53191ece..85b8454d9608 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -6788,11 +6788,13 @@ static noinline int walk_up_proc(struct btrfs_trans_handle *trans,
6788 &wc->flags[level]); 6788 &wc->flags[level]);
6789 if (ret < 0) { 6789 if (ret < 0) {
6790 btrfs_tree_unlock_rw(eb, path->locks[level]); 6790 btrfs_tree_unlock_rw(eb, path->locks[level]);
6791 path->locks[level] = 0;
6791 return ret; 6792 return ret;
6792 } 6793 }
6793 BUG_ON(wc->refs[level] == 0); 6794 BUG_ON(wc->refs[level] == 0);
6794 if (wc->refs[level] == 1) { 6795 if (wc->refs[level] == 1) {
6795 btrfs_tree_unlock_rw(eb, path->locks[level]); 6796 btrfs_tree_unlock_rw(eb, path->locks[level]);
6797 path->locks[level] = 0;
6796 return 1; 6798 return 1;
6797 } 6799 }
6798 } 6800 }