mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
md: allow an md array to appear with 0 drives if it has external metadata
Signed-off-by: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
ca38805945
commit
a17184a911
1 changed files with 4 additions and 3 deletions
|
|
@ -4647,9 +4647,10 @@ static int md_ioctl(struct inode *inode, struct file *file,
|
|||
*/
|
||||
/* if we are not initialised yet, only ADD_NEW_DISK, STOP_ARRAY,
|
||||
* RUN_ARRAY, and GET_ and SET_BITMAP_FILE are allowed */
|
||||
if (!mddev->raid_disks && cmd != ADD_NEW_DISK && cmd != STOP_ARRAY
|
||||
&& cmd != RUN_ARRAY && cmd != SET_BITMAP_FILE
|
||||
&& cmd != GET_BITMAP_FILE) {
|
||||
if ((!mddev->raid_disks && !mddev->external)
|
||||
&& cmd != ADD_NEW_DISK && cmd != STOP_ARRAY
|
||||
&& cmd != RUN_ARRAY && cmd != SET_BITMAP_FILE
|
||||
&& cmd != GET_BITMAP_FILE) {
|
||||
err = -ENODEV;
|
||||
goto abort_unlock;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue