aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/elevator.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/elevator.c')
-rw-r--r--drivers/block/elevator.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/block/elevator.c b/drivers/block/elevator.c
index 89982925f9e2..f831f08f839c 100644
--- a/drivers/block/elevator.c
+++ b/drivers/block/elevator.c
@@ -286,6 +286,13 @@ void elv_requeue_request(request_queue_t *q, struct request *rq)
286 } 286 }
287 287
288 /* 288 /*
289 * the request is prepped and may have some resources allocated.
290 * allowing unprepped requests to pass this one may cause resource
291 * deadlock. turn on softbarrier.
292 */
293 rq->flags |= REQ_SOFTBARRIER;
294
295 /*
289 * if iosched has an explicit requeue hook, then use that. otherwise 296 * if iosched has an explicit requeue hook, then use that. otherwise
290 * just put the request at the front of the queue 297 * just put the request at the front of the queue
291 */ 298 */
@@ -381,6 +388,12 @@ struct request *elv_next_request(request_queue_t *q)
381 if (ret == BLKPREP_OK) { 388 if (ret == BLKPREP_OK) {
382 break; 389 break;
383 } else if (ret == BLKPREP_DEFER) { 390 } else if (ret == BLKPREP_DEFER) {
391 /*
392 * the request may have been (partially) prepped.
393 * we need to keep this request in the front to
394 * avoid resource deadlock. turn on softbarrier.
395 */
396 rq->flags |= REQ_SOFTBARRIER;
384 rq = NULL; 397 rq = NULL;
385 break; 398 break;
386 } else if (ret == BLKPREP_KILL) { 399 } else if (ret == BLKPREP_KILL) {