]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: don't allow a subvol to be deleted if it is the default subovl
authorJosef Bacik <jbacik@fusionio.com>
Mon, 12 Aug 2013 19:36:44 +0000 (15:36 -0400)
committerChris Mason <chris.mason@fusionio.com>
Sun, 1 Sep 2013 12:05:02 +0000 (08:05 -0400)
commitc3fd8acc1284078c536df19bcbd980a54b6c23d8
tree17a101c9ff84cec0f2bbf184f44bd4f6858e92f3
parent8d8540092d75a9f8860892b0e6323df999540de7
Btrfs: don't allow a subvol to be deleted if it is the default subovl

Eric pointed out that btrfs will happily allow you to delete the default subvol.
This is a problem obviously since the next time you go to mount the file system
it will freak out because it can't find the root.  Fix this by adding a check to
see if our default subvol points to the subvol we are trying to delete, and if
it does not allowing it to happen.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/ioctl.c