]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: use ioctl args support mask for device delete
authorDavid Sterba <dsterba@suse.com>
Fri, 21 Feb 2020 12:30:14 +0000 (13:30 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:42 +0000 (17:01 +0100)
commit5ef3d3fee133b4e5b1efab3fb97e7b7f96744f38
treedd3573300e185f5df0700e33aa8371849364da43
parentc1642a336125f8a6cc3e28f13679e23879d14c01
btrfs: use ioctl args support mask for device delete

When the device remove v2 ioctl was added, the full support mask was
added to sanity check the flags. However this would allow to let the
subvolume related flags to be accepted. This is not supposed to happen.

Use the correct support mask, which means that now any of
BTRFS_SUBVOL_CREATE_ASYNC, BTRFS_SUBVOL_RDONLY or
BTRFS_SUBVOL_QGROUP_INHERIT will be rejected as ENOTSUPP. Though this is
a user-visible change, specifying subvolume flags for device deletion
does not make sense and there are hopefully no applications doing that.

Reviewed-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c