diff options
| author | Yang Erkun <yangerkun@huawei.com> | 2026-08-05 20:29:28 +0800 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-08-15 20:01:20 -0600 |
| commit | f8d21c590e55d629abed675554b186291ac08915 (patch) | |
| tree | 27e91605759dc1626295d8d06893c8d3741636eb /scripts/Makefile.thinlto | |
| parent | db285268df7948f6edbb7c8bb7cd02da3ceec6b4 (diff) | |
| download | linux-stable-f8d21c590e55d629abed675554b186291ac08915.tar.gz linux-stable-f8d21c590e55d629abed675554b186291ac08915.zip | |
nbd: factor out a nbd_genl_foreach_sock
The NBD_ATTR_SOCKETS walk is duplicated in nbd_genl_connect (add sockets)
and nbd_genl_reconfigure (reconnect). Factor out a single helper that
walks the list and calls a callback per fd; with a NULL callback it is a
pure counter, used by a later patch to learn nr_hw_queues before the
device exists. Returns the number of fds walked (>= 0) or a negative
errno; a callback >0 will stops early.
Reviewed-by: Yu Kuai <yukuai@fygo.io>
Signed-off-by: Yang Erkun <yangerkun@huawei.com>
Link: https://patch.msgid.link/20260805122930.57647-7-yangerkun@huawei.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
