diff options
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r-- | fs/btrfs/super.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 0a14b495532f..db9fb3bc1e33 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/namei.h> | 38 | #include <linux/namei.h> |
39 | #include <linux/miscdevice.h> | 39 | #include <linux/miscdevice.h> |
40 | #include <linux/version.h> | 40 | #include <linux/version.h> |
41 | #include <linux/magic.h> | ||
41 | #include "compat.h" | 42 | #include "compat.h" |
42 | #include "ctree.h" | 43 | #include "ctree.h" |
43 | #include "disk-io.h" | 44 | #include "disk-io.h" |
@@ -51,7 +52,6 @@ | |||
51 | #include "export.h" | 52 | #include "export.h" |
52 | #include "compression.h" | 53 | #include "compression.h" |
53 | 54 | ||
54 | #define BTRFS_SUPER_MAGIC 0x9123683E | ||
55 | 55 | ||
56 | static struct super_operations btrfs_super_ops; | 56 | static struct super_operations btrfs_super_ops; |
57 | 57 | ||
@@ -582,7 +582,7 @@ static long btrfs_control_ioctl(struct file *file, unsigned int cmd, | |||
582 | { | 582 | { |
583 | struct btrfs_ioctl_vol_args *vol; | 583 | struct btrfs_ioctl_vol_args *vol; |
584 | struct btrfs_fs_devices *fs_devices; | 584 | struct btrfs_fs_devices *fs_devices; |
585 | int ret = 0; | 585 | int ret = -ENOTTY; |
586 | int len; | 586 | int len; |
587 | 587 | ||
588 | if (!capable(CAP_SYS_ADMIN)) | 588 | if (!capable(CAP_SYS_ADMIN)) |
@@ -594,6 +594,7 @@ static long btrfs_control_ioctl(struct file *file, unsigned int cmd, | |||
594 | goto out; | 594 | goto out; |
595 | } | 595 | } |
596 | len = strnlen(vol->name, BTRFS_PATH_NAME_MAX); | 596 | len = strnlen(vol->name, BTRFS_PATH_NAME_MAX); |
597 | |||
597 | switch (cmd) { | 598 | switch (cmd) { |
598 | case BTRFS_IOC_SCAN_DEV: | 599 | case BTRFS_IOC_SCAN_DEV: |
599 | ret = btrfs_scan_one_device(vol->name, FMODE_READ, | 600 | ret = btrfs_scan_one_device(vol->name, FMODE_READ, |