diff options
Diffstat (limited to 'block/ll_rw_blk.c')
-rw-r--r-- | block/ll_rw_blk.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 6b5173ac8131..c99b46354859 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c | |||
@@ -340,6 +340,15 @@ unsigned blk_ordered_req_seq(struct request *rq) | |||
340 | if (rq == &q->post_flush_rq) | 340 | if (rq == &q->post_flush_rq) |
341 | return QUEUE_ORDSEQ_POSTFLUSH; | 341 | return QUEUE_ORDSEQ_POSTFLUSH; |
342 | 342 | ||
343 | /* | ||
344 | * !fs requests don't need to follow barrier ordering. Always | ||
345 | * put them at the front. This fixes the following deadlock. | ||
346 | * | ||
347 | * http://thread.gmane.org/gmane.linux.kernel/537473 | ||
348 | */ | ||
349 | if (!blk_fs_request(rq)) | ||
350 | return QUEUE_ORDSEQ_DRAIN; | ||
351 | |||
343 | if ((rq->cmd_flags & REQ_ORDERED_COLOR) == | 352 | if ((rq->cmd_flags & REQ_ORDERED_COLOR) == |
344 | (q->orig_bar_rq->cmd_flags & REQ_ORDERED_COLOR)) | 353 | (q->orig_bar_rq->cmd_flags & REQ_ORDERED_COLOR)) |
345 | return QUEUE_ORDSEQ_DRAIN; | 354 | return QUEUE_ORDSEQ_DRAIN; |