提交 472b909f 编写于 作者: J Josef Bacik 提交者: Chris Mason

btrfs: only unlock block in verify_parent_transid if we locked it

This is a regression from my patch a26e8c9f, we
need to only unlock the block if we were the one who locked it.  Otherwise this
will trip BUG_ON()'s in locking.c  Thanks,

cc: stable@vger.kernel.org
Signed-off-by: NJosef Bacik <jbacik@fb.com>
Signed-off-by: NChris Mason <clm@fb.com>
上级 46c4e71e
......@@ -369,7 +369,8 @@ static int verify_parent_transid(struct extent_io_tree *io_tree,
out:
unlock_extent_cached(io_tree, eb->start, eb->start + eb->len - 1,
&cached_state, GFP_NOFS);
btrfs_tree_read_unlock_blocking(eb);
if (need_lock)
btrfs_tree_read_unlock_blocking(eb);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册