diff --git a/[refs] b/[refs] index 66bf4ee214fe..d2aa040161fd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e126c7b6bbb0c5b5fc3ecf2fd1ae67c803b747cc +refs/heads/master: bc90ba093af2e5022b9d055a2148b54a6aa35bc9 diff --git a/trunk/block/ll_rw_blk.c b/trunk/block/ll_rw_blk.c index 6b5173ac8131..c99b46354859 100644 --- a/trunk/block/ll_rw_blk.c +++ b/trunk/block/ll_rw_blk.c @@ -340,6 +340,15 @@ unsigned blk_ordered_req_seq(struct request *rq) if (rq == &q->post_flush_rq) return QUEUE_ORDSEQ_POSTFLUSH; + /* + * !fs requests don't need to follow barrier ordering. Always + * put them at the front. This fixes the following deadlock. + * + * http://thread.gmane.org/gmane.linux.kernel/537473 + */ + if (!blk_fs_request(rq)) + return QUEUE_ORDSEQ_DRAIN; + if ((rq->cmd_flags & REQ_ORDERED_COLOR) == (q->orig_bar_rq->cmd_flags & REQ_ORDERED_COLOR)) return QUEUE_ORDSEQ_DRAIN;