aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2014-09-30 01:36:28 -0400
committerNeilBrown <neilb@suse.de>2014-10-13 22:08:29 -0400
commit326eb17d73a6b424ed7c47c693ff53721618fc48 (patch)
tree477ebc0efa842f88a66486e5621ad73a49d532ea /drivers/md
parente1960f8c5cd1420dd2ecf0754a136956246365e7 (diff)
md: remove unnecessary test for MD_MAJOR in md_ioctl()
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>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/md.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 9939122ca00c..90e1537d1b0a 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -6559,11 +6559,8 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
6559 /* 6559 /*
6560 * The remaining ioctls are changing the state of the 6560 * The remaining ioctls are changing the state of the
6561 * superblock, so we do not allow them on read-only arrays. 6561 * superblock, so we do not allow them on read-only arrays.
6562 * However non-MD ioctls (e.g. get-size) will still come through
6563 * here and hit the 'default' below, so only disallow
6564 * 'md' ioctls, and switch to rw mode if started auto-readonly.
6565 */ 6562 */
6566 if (_IOC_TYPE(cmd) == MD_MAJOR && mddev->ro && mddev->pers) { 6563 if (mddev->ro && mddev->pers) {
6567 if (mddev->ro == 2) { 6564 if (mddev->ro == 2) {
6568 mddev->ro = 0; 6565 mddev->ro = 0;
6569 sysfs_notify_dirent_safe(mddev->sysfs_state); 6566 sysfs_notify_dirent_safe(mddev->sysfs_state);