summaryrefslogtreecommitdiff
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-03-23 22:49:49 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2013-03-23 22:49:49 (GMT)
commit22c3f2fff68abf1ccf88e1a72f61bfede7b91da0 (patch)
tree804affa383e0898c7df60e4b00b6edee8fca1de1 /drivers/md/md.c
parentc8c1f16717b05a9f787e054ada1ddd6dbb910364 (diff)
parent238f5908bd48f9e2f4668e0289e88cba969d710c (diff)
downloadlinux-fsl-qoriq-22c3f2fff68abf1ccf88e1a72f61bfede7b91da0.tar.xz
Merge tag 'md-3.9-fixes' of git://neil.brown.name/md
Pull md fixes from NeilBrown: "A few bugfixes for md - recent regressions in raid5 - recent regressions in dmraid - a few instances of CONFIG_MULTICORE_RAID456 linger Several tagged for -stable" * tag 'md-3.9-fixes' of git://neil.brown.name/md: md: remove CONFIG_MULTICORE_RAID456 entirely md/raid5: ensure sync and DISCARD don't happen at the same time. MD: Prevent sysfs operations on uninitialized kobjects MD RAID5: Avoid accessing gendisk or queue structs when not available md/raid5: schedule_construction should abort if nothing to do.
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index fcb878f..aeceedf 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -7663,10 +7663,8 @@ static int remove_and_add_spares(struct mddev *mddev)
removed++;
}
}
- if (removed)
- sysfs_notify(&mddev->kobj, NULL,
- "degraded");
-
+ if (removed && mddev->kobj.sd)
+ sysfs_notify(&mddev->kobj, NULL, "degraded");
rdev_for_each(rdev, mddev) {
if (rdev->raid_disk >= 0 &&