diff options
author | Jens Axboe <axboe@fb.com> | 2014-09-19 10:04:53 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-09-22 13:55:23 -0400 |
commit | 6b55e1f2d0a5e462e52678278ab749468f1db81c (patch) | |
tree | 8d5c5d578cba71e51d11f2231f5528d0aa9dd7e0 /block | |
parent | a57a178a490345c7236b0077b3de005754389ed6 (diff) |
blk-mq: fix potential oops on out-of-memory in __blk_mq_alloc_rq_maps()
__blk_mq_alloc_rq_maps() can be invoked multiple times, if we scale
back the queue depth if we are low on memory. So don't clear
set->tags when we fail, this is handled directly in
the parent function, blk_mq_alloc_tag_set().
Reported-by: Robert Elliott <Elliott@hp.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-mq.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index a7d70a1bbf36..e83d306907da 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c | |||
@@ -1959,7 +1959,6 @@ out_unwind: | |||
1959 | while (--i >= 0) | 1959 | while (--i >= 0) |
1960 | blk_mq_free_rq_map(set, set->tags[i], i); | 1960 | blk_mq_free_rq_map(set, set->tags[i], i); |
1961 | 1961 | ||
1962 | set->tags = NULL; | ||
1963 | return -ENOMEM; | 1962 | return -ENOMEM; |
1964 | } | 1963 | } |
1965 | 1964 | ||