Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
[sfrench/cifs-2.6.git] / fs / btrfs / super.c
index 7256cf242eb07c7f86521326b1ef6bdd338ce645..db9fb3bc1e333c5255a92537a9891d4f8716f899 100644 (file)
@@ -582,7 +582,7 @@ static long btrfs_control_ioctl(struct file *file, unsigned int cmd,
 {
        struct btrfs_ioctl_vol_args *vol;
        struct btrfs_fs_devices *fs_devices;
-       int ret = 0;
+       int ret = -ENOTTY;
        int len;
 
        if (!capable(CAP_SYS_ADMIN))
@@ -594,6 +594,7 @@ static long btrfs_control_ioctl(struct file *file, unsigned int cmd,
                goto out;
        }
        len = strnlen(vol->name, BTRFS_PATH_NAME_MAX);
+
        switch (cmd) {
        case BTRFS_IOC_SCAN_DEV:
                ret = btrfs_scan_one_device(vol->name, FMODE_READ,