Skip to content
Commit 19768f80 authored by Ming Lei's avatar Ming Lei Committed by Jens Axboe
Browse files

block: null_blk: only set set->nr_maps as 3 if active poll_queues is > 0

It isn't correct to set set->nr_maps as 3 if g_poll_queues is > 0 since
we can change it via configfs for null_blk device created there, so only
set it as 3 if active poll_queues is > 0.

Fixes divide zero exception reported by Shinichiro.

Fixes: 2bfdbe8b

 ("null_blk: allow zero poll queues")
Reported-by: default avatarShinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
Reviewed-by: default avatarShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/r/20211224010831.1521805-1-ming.lei@redhat.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 3427f2b2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment