>From b5da8dfdf106ceddc35634f43a02488616a55e7d Mon Sep 17 00:00:00 2001 From: Alan D. Brunelle Date: Wed, 23 Apr 2008 08:50:22 -0400 Subject: [PATCH] Do not use rqhash when merges disabled Signed-off-by: Alan D. Brunelle --- block/elevator.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/block/elevator.c b/block/elevator.c index 88318c3..2ea5fb4 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -313,7 +313,7 @@ static inline void __elv_rqhash_del(struct request *rq) static void elv_rqhash_del(struct request_queue *q, struct request *rq) { - if (ELV_ON_HASH(rq)) + if (!blk_queue_nomerges(q) && ELV_ON_HASH(rq)) __elv_rqhash_del(rq); } @@ -601,7 +601,7 @@ void elv_insert(struct request_queue *q, struct request *rq, int where) BUG_ON(!blk_fs_request(rq)); rq->cmd_flags |= REQ_SORTED; q->nr_sorted++; - if (rq_mergeable(rq)) { + if (!blk_queue_nomerges(q) && rq_mergeable(rq)) { elv_rqhash_add(q, rq); if (!q->last_merge) q->last_merge = rq; -- 1.5.2.5