Skip to content

Commit c60855c

Browse files
Aaron Luaxboe
authored andcommitted
blkpm: avoid sleep when holding queue lock
In blk_post_runtime_resume, an autosuspend request will be initiated for the device. Since we are holding the queue lock, we can't sleep and thus we should use the async version to initiate an autosuspend, i.e. pm_request_suspend instead of pm_runtime_suspend, which might sleep. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent c0a363f commit c60855c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎block/blk-core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3164,7 +3164,7 @@ void blk_post_runtime_resume(struct request_queue *q, int err)
31643164
q->rpm_status = RPM_ACTIVE;
31653165
__blk_run_queue(q);
31663166
pm_runtime_mark_last_busy(q->dev);
3167-
pm_runtime_autosuspend(q->dev);
3167+
pm_request_autosuspend(q->dev);
31683168
} else {
31693169
q->rpm_status = RPM_SUSPENDED;
31703170
}

0 commit comments

Comments
 (0)