btrfs: make FS_INFO ioctl available to anyone
authorDavid Sterba <dsterba@suse.cz>
Thu, 24 Apr 2014 13:09:18 +0000 (15:09 +0200)
committerChris Mason <clm@fb.com>
Tue, 10 Jun 2014 00:20:29 +0000 (17:20 -0700)
This ioctl provides basic info about the filesystem that can be obtained
in other ways (eg. sysfs), there's no reason to restrict it to
CAP_SYSADMIN.

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/ioctl.c

index 92a5184ac69620337fc8805df593cd2c923bdb4e..2db12fc3f7489f7c798b34a32b49d28bdffed6f9 100644 (file)
@@ -2557,9 +2557,6 @@ static long btrfs_ioctl_fs_info(struct btrfs_root *root, void __user *arg)
        struct btrfs_fs_devices *fs_devices = root->fs_info->fs_devices;
        int ret = 0;
 
-       if (!capable(CAP_SYS_ADMIN))
-               return -EPERM;
-
        fi_args = kzalloc(sizeof(*fi_args), GFP_KERNEL);
        if (!fi_args)
                return -ENOMEM;