--- 25-akpm/drivers/block/elevator.c | 12 +++--------- 1 files changed, 3 insertions(+), 9 deletions(-) diff -puN drivers/block/elevator.c~correct-unplugs-on-nr_queued-remove-warnings drivers/block/elevator.c --- 25/drivers/block/elevator.c~correct-unplugs-on-nr_queued-remove-warnings Thu Apr 8 16:20:40 2004 +++ 25-akpm/drivers/block/elevator.c Thu Apr 8 16:20:57 2004 @@ -153,10 +153,8 @@ void elv_requeue_request(request_queue_t * it already went through dequeue, we need to decrement the * in_flight count again */ - if (blk_account_rq(rq)) { - WARN_ON(q->in_flight == 0); + if (blk_account_rq(rq)) q->in_flight--; - } /* * if iosched has an explicit requeue hook, then use that. otherwise @@ -248,10 +246,8 @@ void elv_remove_request(request_queue_t * driver has seen (REQ_STARTED set), to avoid false accounting * for request-request merges */ - if (blk_account_rq(rq)) { + if (blk_account_rq(rq)) q->in_flight++; - WARN_ON(q->in_flight > 2 * q->nr_requests); - } /* * the main clearing point for q->last_merge is on retrieval of @@ -345,10 +341,8 @@ void elv_completed_request(request_queue /* * request is released from the driver, io must be done */ - if (blk_account_rq(rq)) { - WARN_ON(q->in_flight == 0); + if (blk_account_rq(rq)) q->in_flight--; - } if (e->elevator_completed_req_fn) e->elevator_completed_req_fn(q, rq); _