summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2012-12-28 10:33:19 +0100
committerJosef Bacik <josef@toxicpanda.com>2013-01-14 19:52:53 +0100
commit3268a2468eb6a31af89930cbae58a62fe6ca6d2d (patch)
treec8385d5ea8b3e27da7ec1d46a030a1f4f74b9bb6
parentBtrfs: let allocation start from the right raid type (diff)
downloadlinux-3268a2468eb6a31af89930cbae58a62fe6ca6d2d.tar.xz
linux-3268a2468eb6a31af89930cbae58a62fe6ca6d2d.zip
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,
&wc->flags[level]);
if (ret < 0) {
btrfs_tree_unlock_rw(eb, path->locks[level]);
+ path->locks[level] = 0;
return ret;
}
BUG_ON(wc->refs[level] == 0);
if (wc->refs[level] == 1) {
btrfs_tree_unlock_rw(eb, path->locks[level]);
+ path->locks[level] = 0;
return 1;
}
}