null_blk: boundary check queue_mode and irqmode
authorMatias Bjorling <m@bjorling.me>
Wed, 26 Nov 2014 21:45:48 +0000 (14:45 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 26 Nov 2014 21:45:48 +0000 (14:45 -0700)
commit709c8667ada1fa26ac941bb875892afc0046b3e2
tree5d8c74e5ac0bc869bec66503dde23e7fae70a6ab
parentfa573f72790c2c2b9bfd758c5d33959af4a39915
null_blk: boundary check queue_mode and irqmode

When either queue_mode or irq_mode parameter is set outside its
boundaries, the driver will not complete requests. This stalls driver
initialization when partitions are probed. Fix by setting out of bound
values to the parameters default.

Signed-off-by: Matias Bjørling <m@bjorling.me>
Updated by me to have the parse+check in just one function.

Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/null_blk.c