btrfs: only unlock block in verify_parent_transid if we locked it
PATCH 1/1 btrfs: only unlock block in verify_parent_transid if we locked it
This is a regression from my patch a26e8c9f75b0bfd8cccc9e8f110737b136eb5994, 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 <[email protected]>
--- fs/btrfs/disk-io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/btrfs/disk-io.c +2 -1
@@ -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; }
Signature · 1 line
2.0.0
Quoted 4 lines · Josef Bacik
This is a regression from my patch
a26e8c9f75b0bfd8cccc9e8f110737b136eb5994, we need to only unlock the block if we were the one who locked it. Otherwise this will trip BUG_ON()'s inlocking.cThanks,
Reviewed-by Liu Bo <[email protected]>
-liubo
Quoted 27 lines
Signed-off-by Josef Bacik <[email protected]>--- fs/btrfs/disk-io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)fs/btrfs/disk-io.c +2
-1@@ -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; }Signature · 6 lines
2.0.0 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html