]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
md: remove unnecessary test for MD_MAJOR in md_ioctl()
authorNeilBrown <neilb@suse.de>
Tue, 30 Sep 2014 05:36:28 +0000 (15:36 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 14 Oct 2014 02:08:29 +0000 (13:08 +1100)
unknown ioctls no longer get this deep into md_ioctl since
md_ioctl_valid() was introduced in 3.14.
So remove the test and the misleading comment.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c

index 9939122ca00cf573669da324d362b4a504701fd9..90e1537d1b0a85825a4b5698d69d14572f7905fe 100644 (file)
@@ -6559,11 +6559,8 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
        /*
         * The remaining ioctls are changing the state of the
         * superblock, so we do not allow them on read-only arrays.
-        * However non-MD ioctls (e.g. get-size) will still come through
-        * here and hit the 'default' below, so only disallow
-        * 'md' ioctls, and switch to rw mode if started auto-readonly.
         */
-       if (_IOC_TYPE(cmd) == MD_MAJOR && mddev->ro && mddev->pers) {
+       if (mddev->ro && mddev->pers) {
                if (mddev->ro == 2) {
                        mddev->ro = 0;
                        sysfs_notify_dirent_safe(mddev->sysfs_state);