UBUNTU: Ubuntu-2.6.38-12.51
[linux-flexiantxendom0-natty.git] / block / blk.h
index 2db8f32..e03adf8 100644 (file)
@@ -68,7 +68,8 @@ static inline struct request *__elv_next_request(struct request_queue *q)
                                return rq;
                }
 
-               if (!q->elevator->ops->elevator_dispatch_fn(q, 0))
+               if (test_bit(QUEUE_FLAG_DEAD, &q->queue_flags) ||
+                   !q->elevator->ops->elevator_dispatch_fn(q, 0))
                        return NULL;
        }
 }