mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
md: delay notification of 'active_idle' to the recovery thread
sysfs_notify might sleep, so do not call it from md_safemode_timeout. Signed-off-by: Dan Williams <[email protected]>
This commit is contained in:
parent
2339788376
commit
d8e64406a0
2 changed files with 5 additions and 1 deletions
|
|
@ -3483,7 +3483,7 @@ static void md_safemode_timeout(unsigned long data)
|
|||
if (!atomic_read(&mddev->writes_pending)) {
|
||||
mddev->safemode = 1;
|
||||
if (mddev->external)
|
||||
sysfs_notify(&mddev->kobj, NULL, "array_state");
|
||||
set_bit(MD_NOTIFY_ARRAY_STATE, &mddev->flags);
|
||||
}
|
||||
md_wakeup_thread(mddev->thread);
|
||||
}
|
||||
|
|
@ -6051,6 +6051,9 @@ void md_check_recovery(mddev_t *mddev)
|
|||
if (mddev->bitmap)
|
||||
bitmap_daemon_work(mddev->bitmap);
|
||||
|
||||
if (test_and_clear_bit(MD_NOTIFY_ARRAY_STATE, &mddev->flags))
|
||||
sysfs_notify(&mddev->kobj, NULL, "array_state");
|
||||
|
||||
if (mddev->ro)
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue