diff options
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r-- | fs/btrfs/super.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 84c3b66564d0..3814238d6eba 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -589,6 +589,9 @@ static long btrfs_control_ioctl(struct file *file, unsigned int cmd, | |||
589 | int ret = 0; | 589 | int ret = 0; |
590 | int len; | 590 | int len; |
591 | 591 | ||
592 | if (!capable(CAP_SYS_ADMIN)) | ||
593 | return -EPERM; | ||
594 | |||
592 | vol = kmalloc(sizeof(*vol), GFP_KERNEL); | 595 | vol = kmalloc(sizeof(*vol), GFP_KERNEL); |
593 | if (copy_from_user(vol, (void __user *)arg, sizeof(*vol))) { | 596 | if (copy_from_user(vol, (void __user *)arg, sizeof(*vol))) { |
594 | ret = -EFAULT; | 597 | ret = -EFAULT; |