Commit 58952d41 authored by Li Nan's avatar Li Nan
Browse files

nbd: factor out a helper to get nbd_config without holding 'config_lock'

mainline inclusion
from mainline-v6.7-rc3
commit 3123ac77923341774ca3ad1196ad20bb0732bf70
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8P7B3

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3123ac77923341774ca3ad1196ad20bb0732bf70



--------------------------------

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

Signed-off-by: default avatarLi Nan <linan122@huawei.com>
Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
Link: https://lore.kernel.org/r/20231116162316.1740402-3-linan666@huaweicloud.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 9d51c7dc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment