diff options
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 39757566f39b..08e0f8d672c3 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -4647,9 +4647,10 @@ static int md_ioctl(struct inode *inode, struct file *file, | |||
4647 | */ | 4647 | */ |
4648 | /* if we are not initialised yet, only ADD_NEW_DISK, STOP_ARRAY, | 4648 | /* if we are not initialised yet, only ADD_NEW_DISK, STOP_ARRAY, |
4649 | * RUN_ARRAY, and GET_ and SET_BITMAP_FILE are allowed */ | 4649 | * RUN_ARRAY, and GET_ and SET_BITMAP_FILE are allowed */ |
4650 | if (!mddev->raid_disks && cmd != ADD_NEW_DISK && cmd != STOP_ARRAY | 4650 | if ((!mddev->raid_disks && !mddev->external) |
4651 | && cmd != RUN_ARRAY && cmd != SET_BITMAP_FILE | 4651 | && cmd != ADD_NEW_DISK && cmd != STOP_ARRAY |
4652 | && cmd != GET_BITMAP_FILE) { | 4652 | && cmd != RUN_ARRAY && cmd != SET_BITMAP_FILE |
4653 | && cmd != GET_BITMAP_FILE) { | ||
4653 | err = -ENODEV; | 4654 | err = -ENODEV; |
4654 | goto abort_unlock; | 4655 | goto abort_unlock; |
4655 | } | 4656 | } |