diff options
author | NeilBrown <neilb@suse.de> | 2010-06-01 13:37:23 +0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-07-21 07:27:53 +0400 |
commit | 00bcb4ac7ee7e557a491b614219142cea0ef16f4 (patch) | |
tree | 992cfa1d0e653aa3de8f0865c5e1a5a0fee4f935 /drivers/md/raid5.c | |
parent | d0c6f6258478e1dba532bf7c28e2cd6e1047d3a4 (diff) | |
download | linux-00bcb4ac7ee7e557a491b614219142cea0ef16f4.tar.xz |
md: reduce dependence on sysfs.
We will want md devices to live as dm targets where sysfs is not
visible. So allow md to not connect to sysfs.
Signed-off-by: NeilBrown <neilb@suse.de>
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) /* Ok, everything is just fine now */ if (mddev->to_remove == &raid5_attrs_group) mddev->to_remove = NULL; - else if (sysfs_create_group(&mddev->kobj, &raid5_attrs_group)) + else if (mddev->kobj.sd && + sysfs_create_group(&mddev->kobj, &raid5_attrs_group)) printk(KERN_WARNING "md/raid:%s: failed to create sysfs attributes.\n", mdname(mddev)); @@ -5545,10 +5546,7 @@ static int raid5_start_reshape(mddev_t *mddev) sprintf(nm, "rd%d", rdev->raid_disk); if (sysfs_create_link(&mddev->kobj, &rdev->kobj, nm)) - printk(KERN_WARNING - "md/raid:%s: failed to create " - " link %s\n", - mdname(mddev), nm); + /* Failure here is OK */; } else break; } |