diff options
| author | John W. Linville <linville@tuxdriver.com> | 2006-06-05 14:42:27 -0400 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2006-06-05 14:42:27 -0400 |
| commit | dea58b80f2625d3712645fb6ff0af45866cedaae (patch) | |
| tree | b9c0d4f7d4fcd90e438b5cc5d05471e52615a62d /drivers/md/md.c | |
| parent | b1141f6d5dead296adcabd4a1e8ea2b994e287cb (diff) | |
| parent | 672c6108a51bf559d19595d9f8193dfd81f0f752 (diff) | |
Merge branch 'from-linus' into upstream
Diffstat (limited to 'drivers/md/md.c')
| -rw-r--r-- | drivers/md/md.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 3ca3cfb03a7e..f19b874753a9 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -167,6 +167,15 @@ void md_new_event(mddev_t *mddev) } EXPORT_SYMBOL_GPL(md_new_event); +/* Alternate version that can be called from interrupts + * when calling sysfs_notify isn't needed. + */ +void md_new_event_inintr(mddev_t *mddev) +{ + atomic_inc(&md_event_count); + wake_up(&md_event_waiters); +} + /* * Enables to iterate over all existing md arrays * all_mddevs_lock protects this list. @@ -4149,7 +4158,7 @@ void md_error(mddev_t *mddev, mdk_rdev_t *rdev) set_bit(MD_RECOVERY_INTR, &mddev->recovery); set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); md_wakeup_thread(mddev->thread); - md_new_event(mddev); + md_new_event_inintr(mddev); } /* seq_file implementation /proc/mdstat */ @@ -5028,8 +5037,10 @@ static int md_notify_reboot(struct notifier_block *this, printk(KERN_INFO "md: stopping all md devices.\n"); ITERATE_MDDEV(mddev,tmp) - if (mddev_trylock(mddev)) + if (mddev_trylock(mddev)) { do_md_stop (mddev, 1); + mddev_unlock(mddev); + } /* * certain more exotic SCSI devices are known to be * volatile wrt too early system reboots. While the |
