On Fri, 2020-02-21 at 14:02 +0100, David Sterba wrote:
> Using the defined mask instead of flag enumeration in the ioctl
> handler
> is preferred. No functional changes.
>
> Signed-off-by: David Sterba <dsterba@xxxxxxxx>
> ---
> fs/btrfs/ioctl.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
> index 7305e6770157..a7872cacd0aa 100644
> --- a/fs/btrfs/ioctl.c
> +++ b/fs/btrfs/ioctl.c
> @@ -1838,9 +1838,7 @@ static noinline int
> btrfs_ioctl_snap_create_v2(struct file *file,
> return PTR_ERR(vol_args);
> vol_args->name[BTRFS_SUBVOL_NAME_MAX] = '\0';
>
> - if (vol_args->flags &
> - ~(BTRFS_SUBVOL_CREATE_ASYNC | BTRFS_SUBVOL_RDONLY |
> - BTRFS_SUBVOL_QGROUP_INHERIT)) {
> + if (vol_args->flags & ~BTRFS_SUBVOL_CREATE_ARGS_MASK) {
> ret = -EOPNOTSUPP;
> goto free_args;
> }
Looks good to me,
Reviewed-by: Marcos Paulo de Souza <mpdesouza@xxxxxxxx>