summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorAaron Lu <aaron.lu@intel.com>2013-05-17 15:47:20 +0800
committerJens Axboe <axboe@kernel.dk>2013-05-17 10:00:43 +0200
commitc60855cdb976c632b3bf8922eeab8a0e78edfc04 (patch)
tree5f261de9a65462c17e0ca756ebff059127b96803 /block
parentc0a363f5cf21f79d72ab630524c3aa06fc6d066c (diff)
downloadop-kernel-dev-c60855cdb976c632b3bf8922eeab8a0e78edfc04.zip
op-kernel-dev-c60855cdb976c632b3bf8922eeab8a0e78edfc04.tar.gz
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>
Diffstat (limited to 'block')
-rw-r--r--block/blk-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 33c33bc..d5745b5 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -3164,7 +3164,7 @@ void blk_post_runtime_resume(struct request_queue *q, int err)
q->rpm_status = RPM_ACTIVE;
__blk_run_queue(q);
pm_runtime_mark_last_busy(q->dev);
- pm_runtime_autosuspend(q->dev);
+ pm_request_autosuspend(q->dev);
} else {
q->rpm_status = RPM_SUSPENDED;
}
OpenPOWER on IntegriCloud