From: Tejun Heo Date: Sun, 5 Feb 2006 07:27:38 +0000 (-0800) Subject: [PATCH] block: request_queue->ordcolor must not be flipped on SOFTBARRIER X-Git-Tag: v2.6.16-rc3~172 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=238e7db9357bfe1ce3d6f7ac1e60e595e9d46b7b;p=linux-2.6 [PATCH] block: request_queue->ordcolor must not be flipped on SOFTBARRIER q->ordcolor must not be flipped on SOFTBARRIER. Signed-off-by: Tejun Heo Acked-by: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/block/elevator.c b/block/elevator.c index 96a61e029c..2fc269f697 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -323,7 +323,8 @@ void __elv_add_request(request_queue_t *q, struct request *rq, int where, /* * toggle ordered color */ - q->ordcolor ^= 1; + if (blk_barrier_rq(rq)) + q->ordcolor ^= 1; /* * barriers implicitly indicate back insertion