nbd: fix crash when the blksize is zero
authorXiubo Li <xiubli@redhat.com>
Wed, 29 May 2019 20:16:05 +0000 (15:16 -0500)
committerJens Axboe <axboe@kernel.dk>
Thu, 11 Jul 2019 03:21:16 +0000 (21:21 -0600)
commit553768d1169a48c0cd87c4eb4ab57534ee663415
tree0f08a0b21d2a773f3f400c0e725444f20f746dc5
parentb49773e7bcf316f238f6709ad9e1999dcc3ed433
nbd: fix crash when the blksize is zero

This will allow the blksize to be set zero and then use 1024 as
default.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Xiubo Li <xiubli@redhat.com>
[fix to use goto out instead of return in genl_connect]
Signed-off-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/nbd.c