summaryrefslogtreecommitdiff
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-10-29 13:45:54 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-10-29 13:45:54 -0300
commita71852147516bc1cb5b0b3cbd13639bfd4022dc8 (patch)
treee1950ad489b1cc9f4404c643d94ff87ba595a8c1 /fs/btrfs/ioctl.c
parentbadc0e42604c4465facd81d2323e98b3b1eb9188 (diff)
Linux-libre 4.2.5-gnupck-4.2.5-gnu
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 0770c9158..f490b6155 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -4647,6 +4647,11 @@ locked:
bctl->flags |= BTRFS_BALANCE_TYPE_MASK;
}
+ if (bctl->flags & ~(BTRFS_BALANCE_ARGS_MASK | BTRFS_BALANCE_TYPE_MASK)) {
+ ret = -EINVAL;
+ goto out_bargs;
+ }
+
do_balance:
/*
* Ownership of bctl and mutually_exclusive_operation_running