Btrfs: fix lock leak when resuming snapshot deletion
authorJosef Bacik <jbacik@fusionio.com>
Mon, 15 Jul 2013 16:41:42 +0000 (12:41 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2013 08:25:54 +0000 (16:25 +0800)
commit849f48aea9edb426a418b7b38f5c903fcc84fdf5
treec4cecb36ec2fdb004be8243239f95bc1a868a265
parentcf63fbd49c23ad07983e629febfc3cbcc9382d05
Btrfs: fix lock leak when resuming snapshot deletion

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@zadarastorage.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/extent-tree.c