This is a note to let you know that I've just added the patch titled Btrfs: fix lock leak when resuming snapshot deletion to the 3.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: btrfs-fix-lock-leak-when-resuming-snapshot-deletion.patch and it can be found in the queue-3.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From fec386ac1428f9c0e672df952cbca5cebd4e4e2f Mon Sep 17 00:00:00 2001 From: Josef Bacik <jbacik@xxxxxxxxxxxx> Date: Mon, 15 Jul 2013 12:41:42 -0400 Subject: Btrfs: fix lock leak when resuming snapshot deletion From: Josef Bacik <jbacik@xxxxxxxxxxxx> commit fec386ac1428f9c0e672df952cbca5cebd4e4e2f upstream. We aren't setting path->locks[level] when we resume a snapshot deletion which means we won't unlock the buffer when we free the path. This causes deadlocks if we happen to re-allocate the block before we've evicted the extent buffer from cache. Thanks, Reported-by: Alex Lyakas <alex.btrfs@xxxxxxxxxxxxxxxxx> Signed-off-by: Josef Bacik <jbacik@xxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/btrfs/extent-tree.c | 2 ++ 1 file changed, 2 insertions(+) --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -6903,6 +6903,7 @@ int btrfs_drop_snapshot(struct btrfs_roo while (1) { btrfs_tree_lock(path->nodes[level]); btrfs_set_lock_blocking(path->nodes[level]); + path->locks[level] = BTRFS_WRITE_LOCK_BLOCKING; ret = btrfs_lookup_extent_info(trans, root, path->nodes[level]->start, @@ -6919,6 +6920,7 @@ int btrfs_drop_snapshot(struct btrfs_roo break; btrfs_tree_unlock(path->nodes[level]); + path->locks[level] = 0; WARN_ON(wc->refs[level] != 1); level--; } Patches currently in stable-queue which might be from jbacik@xxxxxxxxxxxx are queue-3.4/btrfs-fix-lock-leak-when-resuming-snapshot-deletion.patch queue-3.4/btrfs-re-add-root-to-dead-root-list-if-we-stop-dropping-it.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html