Commit 1f80e608 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] AS: handle non-block requests

From: Nick Piggin <piggin@cyberone.com.au>

as_completed_request() can be called for requests which were not generated by
the generic block layer.  Handle these, to avoid a subsequent WARN_ON (at
least).

Also kill a separate WARN_ON which is bogusly triggering.
parent db5867af
...@@ -915,9 +915,10 @@ static void as_completed_request(request_queue_t *q, struct request *rq) ...@@ -915,9 +915,10 @@ static void as_completed_request(request_queue_t *q, struct request *rq)
if (unlikely(arq->state != AS_RQ_DISPATCHED)) if (unlikely(arq->state != AS_RQ_DISPATCHED))
return; return;
if (ad->changed_batch && ad->nr_dispatched == 1) { if (!blk_fs_request(rq))
WARN_ON(ad->batch_data_dir == arq->is_sync); return;
if (ad->changed_batch && ad->nr_dispatched == 1) {
kblockd_schedule_work(&ad->antic_work); kblockd_schedule_work(&ad->antic_work);
ad->changed_batch = 0; ad->changed_batch = 0;
...@@ -933,7 +934,6 @@ static void as_completed_request(request_queue_t *q, struct request *rq) ...@@ -933,7 +934,6 @@ static void as_completed_request(request_queue_t *q, struct request *rq)
* and writeback caches * and writeback caches
*/ */
if (ad->new_batch && ad->batch_data_dir == arq->is_sync) { if (ad->new_batch && ad->batch_data_dir == arq->is_sync) {
WARN_ON(ad->batch_data_dir != REQ_SYNC);
update_write_batch(ad); update_write_batch(ad);
ad->current_batch_expires = jiffies + ad->current_batch_expires = jiffies +
ad->batch_expire[REQ_SYNC]; ad->batch_expire[REQ_SYNC];
......
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