From b759113499d6c7cb75fab04f56772579308bc0f8 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 17 Apr 2009 08:36:50 +0200 Subject: block: make blk_abort_queue() ignore non-request based devices There's nothing to do for those devices, since the timeout handling is based on requests. Signed-off-by: Jens Axboe --- block/blk-timeout.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'block/blk-timeout.c') diff --git a/block/blk-timeout.c b/block/blk-timeout.c index bbbdc4b8ccf2..8f570c4c80ee 100644 --- a/block/blk-timeout.c +++ b/block/blk-timeout.c @@ -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); -- cgit v1.2.3-59-g8ed1b