diff options
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/md.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index f1ac356e656d..866c704e008a 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -2226,8 +2226,11 @@ static int add_new_disk(mddev_t * mddev, mdu_disk_info_t *info) | |||
2226 | mdname(mddev)); | 2226 | mdname(mddev)); |
2227 | return -EINVAL; | 2227 | return -EINVAL; |
2228 | } | 2228 | } |
2229 | rdev = md_import_device(dev, mddev->major_version, | 2229 | if (mddev->persistent) |
2230 | mddev->minor_version); | 2230 | rdev = md_import_device(dev, mddev->major_version, |
2231 | mddev->minor_version); | ||
2232 | else | ||
2233 | rdev = md_import_device(dev, -1, -1); | ||
2231 | if (IS_ERR(rdev)) { | 2234 | if (IS_ERR(rdev)) { |
2232 | printk(KERN_WARNING | 2235 | printk(KERN_WARNING |
2233 | "md: md_import_device returned %ld\n", | 2236 | "md: md_import_device returned %ld\n", |