diff options
author | Anton Vorontsov <anton@enomsg.org> | 2013-03-24 20:06:35 -0700 |
---|---|---|
committer | Anton Vorontsov <anton@enomsg.org> | 2013-03-24 20:06:35 -0700 |
commit | 6e997bb894beef128fcfe1679e0830f97dee6dc2 (patch) | |
tree | 078d95af4d30b5e3d5b1db18de215489b26e01ce /drivers/md/md.h | |
parent | c6cc9fc9d42ec82da2c770f0bef1488dc467f29c (diff) | |
parent | 92413a9bee1299cedcc0e5cfbfbc6b42496fb817 (diff) | |
download | linux-6e997bb894beef128fcfe1679e0830f97dee6dc2.tar.gz linux-6e997bb894beef128fcfe1679e0830f97dee6dc2.tar.bz2 linux-6e997bb894beef128fcfe1679e0830f97dee6dc2.zip |
Merge branch 'urgent'
Conflicts:
drivers/power/pm2301_charger.c
Diffstat (limited to 'drivers/md/md.h')
-rw-r--r-- | drivers/md/md.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/md.h b/drivers/md/md.h index eca59c3074ef..d90fb1a879e1 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h @@ -506,7 +506,7 @@ static inline char * mdname (struct mddev * mddev) static inline int sysfs_link_rdev(struct mddev *mddev, struct md_rdev *rdev) { char nm[20]; - if (!test_bit(Replacement, &rdev->flags)) { + if (!test_bit(Replacement, &rdev->flags) && mddev->kobj.sd) { sprintf(nm, "rd%d", rdev->raid_disk); return sysfs_create_link(&mddev->kobj, &rdev->kobj, nm); } else @@ -516,7 +516,7 @@ static inline int sysfs_link_rdev(struct mddev *mddev, struct md_rdev *rdev) static inline void sysfs_unlink_rdev(struct mddev *mddev, struct md_rdev *rdev) { char nm[20]; - if (!test_bit(Replacement, &rdev->flags)) { + if (!test_bit(Replacement, &rdev->flags) && mddev->kobj.sd) { sprintf(nm, "rd%d", rdev->raid_disk); sysfs_remove_link(&mddev->kobj, nm); } |