Btrfs: fix lock leak when resuming snapshot deletion

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,

Cc: stable@vger.kernel.org
Reported-by: Alex Lyakas <alex.btrfs@zadarastorage.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>

Changed files
+2
fs
+2
fs/btrfs/extent-tree.c
··· 7523 7523 while (1) { 7524 7524 btrfs_tree_lock(path->nodes[level]); 7525 7525 btrfs_set_lock_blocking(path->nodes[level]); 7526 + path->locks[level] = BTRFS_WRITE_LOCK_BLOCKING; 7526 7527 7527 7528 ret = btrfs_lookup_extent_info(trans, root, 7528 7529 path->nodes[level]->start, ··· 7539 7538 break; 7540 7539 7541 7540 btrfs_tree_unlock(path->nodes[level]); 7541 + path->locks[level] = 0; 7542 7542 WARN_ON(wc->refs[level] != 1); 7543 7543 level--; 7544 7544 }