Commit 92d7e8ba authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] AS: update as_requeue_request()

- Ensure that arq->state is always set (ie.  even if io context
  allocation failed).

- Call as_antic_stop() unconditionally - which checks for the same
  condition.  There are other callers which make the same check and should
  be changed too...
parent 415db1e8
...@@ -1328,19 +1328,17 @@ static void as_requeue_request(request_queue_t *q, struct request *rq) ...@@ -1328,19 +1328,17 @@ static void as_requeue_request(request_queue_t *q, struct request *rq)
struct as_rq *arq = RQ_DATA(rq); struct as_rq *arq = RQ_DATA(rq);
if (arq) { if (arq) {
if (arq->io_context && arq->io_context->aic) { arq->state = AS_RQ_DISPATCHED;
arq->state = AS_RQ_DISPATCHED; if (arq->io_context && arq->io_context->aic)
atomic_inc(&arq->io_context->aic->nr_dispatched); atomic_inc(&arq->io_context->aic->nr_dispatched);
}
} else } else
WARN_ON(!(rq->flags & REQ_HARDBARRIER) && blk_fs_request(rq)); WARN_ON(blk_fs_request(rq)
&& (!(rq->flags & REQ_HARDBARRIER)) );
list_add_tail(&rq->queuelist, ad->dispatch); list_add_tail(&rq->queuelist, ad->dispatch);
/* Stop anticipating - let this request get through */ /* Stop anticipating - let this request get through */
if (ad->antic_status == ANTIC_WAIT_REQ as_antic_stop(ad);
|| ad->antic_status == ANTIC_WAIT_NEXT)
as_antic_stop(ad);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment