OSDN Git Service

btrfs: call mnt_drop_write after interrupted subvol deletion
authorDavid Sterba <dsterba@suse.cz>
Fri, 6 Dec 2013 16:51:32 +0000 (17:51 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Dec 2013 15:45:10 +0000 (07:45 -0800)
commit89ec75229a591cd7a3f57c330dc0791b8646b112
tree0074b91e06f2f95ca4f1763e86a3ce8ceafd37a7
parent6b047827d4cdd57ac7c4f9da2d779d811649566f
btrfs: call mnt_drop_write after interrupted subvol deletion

commit e43f998e47bae27e37e159915625e8d4b130153b upstream.

If btrfs_ioctl_snap_destroy blocks on the mutex and the process is
killed, mnt_write count is unbalanced and leads to unmountable
filesystem.

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/ioctl.c