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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2023 16:01:56 +0000 (17:01 +0100)
commit4087936a97b899efa0f51d5b71f31f52cd34f302
tree51b5b81ee9da469d9278b9d5534b79c97dbec24d
parent4a4bba9f0470d0cb6afd8c8e880b04567585f542
nbd: fold nbd config initialization into nbd_alloc_config()

[ Upstream commit 1b59860540a4018e8071dc18d4893ec389506b7d ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/block/nbd.c