nbd: validate the block size in nbd_set_size
authorChristoph Hellwig <hch@lst.de>
Mon, 16 Nov 2020 14:57:00 +0000 (15:57 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 16 Nov 2020 15:34:14 +0000 (08:34 -0700)
commitdcbddf541f18e367ac9cdad8e223d382cd303161
tree3d5a1e14a57ba5953c02b1414dc0f8e30aa2dab6
parent2dc691cc4ac259f8b5bb0bd8670645af894d30eb
nbd: validate the block size in nbd_set_size

Move the validation of the block from the callers into nbd_set_size.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/nbd.c