Btrfs: fix lock leak when resuming snapshot deletion
authorJosef Bacik <jbacik@fusionio.com>
Mon, 15 Jul 2013 16:41:42 +0000 (12:41 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 2 Aug 2013 20:15:00 +0000 (22:15 +0200)
commitf9b000a7bb45c8cbd2d380f7716b8ef90f1ac68a
tree982550e5e0181ed97b8ebc25adfd9d09b47fdf72
parent694fc86fb2c73cdc40d2ddd536f40671efa4ad0e
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: Ben Hutchings <ben@decadent.org.uk>
fs/btrfs/extent-tree.c