diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2012-12-28 09:33:19 +0000 |
---|---|---|
committer | Josef Bacik <josef@toxicpanda.com> | 2013-01-14 13:52:53 -0500 |
commit | 3268a2468eb6a31af89930cbae58a62fe6ca6d2d (patch) | |
tree | c8385d5ea8b3e27da7ec1d46a030a1f4f74b9bb6 | |
parent | ac5c93005b7073732e268606688fb6c821d5310e (diff) | |
download | op-kernel-dev-3268a2468eb6a31af89930cbae58a62fe6ca6d2d.zip op-kernel-dev-3268a2468eb6a31af89930cbae58a62fe6ca6d2d.tar.gz |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index aeba531..85b8454 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; } } |