Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 472b909f authored by Josef Bacik's avatar Josef Bacik Committed by Chris Mason
Browse files

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: default avatarJosef Bacik <jbacik@fb.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 46c4e71e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -369,6 +369,7 @@ 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);
	if (need_lock)
		btrfs_tree_read_unlock_blocking(eb);
	return ret;
}