mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
btrfs: only unlock block in verify_parent_transid if we locked it
commit472b909ff6upstream. This is a regression from my patcha26e8c9f75, 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, Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Chris Mason <clm@fb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9b7954efb6
commit
058ac415b7
@@ -368,7 +368,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user