diff options
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 96c690279fc6..6a7a30113161 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -5158,7 +5158,8 @@ static int run(mddev_t *mddev) | |||
5158 | /* Ok, everything is just fine now */ | 5158 | /* Ok, everything is just fine now */ |
5159 | if (mddev->to_remove == &raid5_attrs_group) | 5159 | if (mddev->to_remove == &raid5_attrs_group) |
5160 | mddev->to_remove = NULL; | 5160 | mddev->to_remove = NULL; |
5161 | else if (sysfs_create_group(&mddev->kobj, &raid5_attrs_group)) | 5161 | else if (mddev->kobj.sd && |
5162 | sysfs_create_group(&mddev->kobj, &raid5_attrs_group)) | ||
5162 | printk(KERN_WARNING | 5163 | printk(KERN_WARNING |
5163 | "md/raid:%s: failed to create sysfs attributes.\n", | 5164 | "md/raid:%s: failed to create sysfs attributes.\n", |
5164 | mdname(mddev)); | 5165 | mdname(mddev)); |
@@ -5545,10 +5546,7 @@ static int raid5_start_reshape(mddev_t *mddev) | |||
5545 | sprintf(nm, "rd%d", rdev->raid_disk); | 5546 | sprintf(nm, "rd%d", rdev->raid_disk); |
5546 | if (sysfs_create_link(&mddev->kobj, | 5547 | if (sysfs_create_link(&mddev->kobj, |
5547 | &rdev->kobj, nm)) | 5548 | &rdev->kobj, nm)) |
5548 | printk(KERN_WARNING | 5549 | /* Failure here is OK */; |
5549 | "md/raid:%s: failed to create " | ||
5550 | " link %s\n", | ||
5551 | mdname(mddev), nm); | ||
5552 | } else | 5550 | } else |
5553 | break; | 5551 | break; |
5554 | } | 5552 | } |