block: make blk_abort_queue() ignore non-request based devices
authorJens Axboe <jens.axboe@oracle.com>
Fri, 17 Apr 2009 06:36:50 +0000 (08:36 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 22 Apr 2009 06:35:10 +0000 (08:35 +0200)
There's nothing to do for those devices, since the timeout handling is
based on requests.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/blk-timeout.c

index bbbdc4b8ccf27a9d0d1f4a9648a930b89f8761a0..8f570c4c80ee822538344ef4bbcb8a94cc3ebff2 100644 (file)
@@ -211,6 +211,12 @@ void blk_abort_queue(struct request_queue *q)
        struct request *rq, *tmp;
        LIST_HEAD(list);
 
+       /*
+        * Not a request based block device, nothing to abort
+        */
+       if (!q->request_fn)
+               return;
+
        spin_lock_irqsave(q->queue_lock, flags);
 
        elv_abort_queue(q);