nbd: fold nbd config initialization into nbd_alloc_config()
authorLi Nan <linan122@huawei.com>
Thu, 16 Nov 2023 16:23:14 +0000 (00:23 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 20 Nov 2023 17:16:44 +0000 (10:16 -0700)
commit1b59860540a4018e8071dc18d4893ec389506b7d
treed23524ab39315121797836cfc411d89ee75d4281
parent8a554c6234731d63014391331127480755d6cac4
nbd: fold nbd config initialization into nbd_alloc_config()

There are no functional changes, make the code cleaner and prepare to
fix null-ptr-dereference while accessing 'nbd->config'.

Signed-off-by: Li Nan <linan122@huawei.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Link: https://lore.kernel.org/r/20231116162316.1740402-2-linan666@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/nbd.c