mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
MD: warn for potential deadlock
The personality thread shouldn't call mddev_suspend(). Because mddev_suspend() will for all IO finish, but IO is handled in personality thread, so this could cause deadlock. To trigger this early, add a warning if mddev_suspend() is called from personality thread. Suggested-by: NeilBrown <[email protected]> Cc: Artur Paszkiewicz <[email protected]> Signed-off-by: Shaohua Li <[email protected]>
This commit is contained in:
parent
399146b80e
commit
70d9798b95
1 changed files with 1 additions and 0 deletions
|
|
@ -305,6 +305,7 @@ static blk_qc_t md_make_request(struct request_queue *q, struct bio *bio)
|
|||
*/
|
||||
void mddev_suspend(struct mddev *mddev)
|
||||
{
|
||||
WARN_ON_ONCE(current == mddev->thread->tsk);
|
||||
if (mddev->suspended++)
|
||||
return;
|
||||
synchronize_rcu();
|
||||
|
|
|
|||
Loading…
Reference in a new issue