diff options
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index d2f8f4049abd..1d49e1c7c905 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -839,6 +839,9 @@ struct request *blk_get_request(struct request_queue *q, int rw, gfp_t gfp_mask) | |||
839 | { | 839 | { |
840 | struct request *rq; | 840 | struct request *rq; |
841 | 841 | ||
842 | if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags))) | ||
843 | return NULL; | ||
844 | |||
842 | BUG_ON(rw != READ && rw != WRITE); | 845 | BUG_ON(rw != READ && rw != WRITE); |
843 | 846 | ||
844 | spin_lock_irq(q->queue_lock); | 847 | spin_lock_irq(q->queue_lock); |