diff options
author | Jianchao Wang <jianchao.w.wang@oracle.com> | 2018-10-12 13:07:26 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-01 09:26:10 +0300 |
commit | 313efb253d03d7b5dc3dee1d25098133fc8b12a5 (patch) | |
tree | 770e4b2a6b975f7834f4adf70995dbfc950abe46 /block/blk-core.c | |
parent | 75448f40b9f6c0fd6d6afdf9101fbb2697fb5608 (diff) | |
download | linux-313efb253d03d7b5dc3dee1d25098133fc8b12a5.tar.xz |
blk-mq: change gfp flags to GFP_NOIO in blk_mq_realloc_hw_ctxs
[ Upstream commit 5b202853ffbc54b29f23c4b1b5f3948efab489a2 ]
blk_mq_realloc_hw_ctxs could be invoked during update hw queues.
At the momemt, IO is blocked. Change the gfp flags from GFP_KERNEL
to GFP_NOIO to avoid forever hang during memory allocation in
blk_mq_realloc_hw_ctxs.
Signed-off-by: Jianchao Wang <jianchao.w.wang@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index af635f878f96..074ae9376189 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1165,7 +1165,7 @@ int blk_init_allocated_queue(struct request_queue *q) { WARN_ON_ONCE(q->mq_ops); - q->fq = blk_alloc_flush_queue(q, NUMA_NO_NODE, q->cmd_size); + q->fq = blk_alloc_flush_queue(q, NUMA_NO_NODE, q->cmd_size, GFP_KERNEL); if (!q->fq) return -ENOMEM; |