[PATCH net-next v3 2/7] vsock: rename the vsock pernet operations
From: Bobby Eshleman
Date: Mon Oct 12 2026 - 18:52:37 EST
vsock_sysctl_ops and its two callbacks are named for the sysctl tables
they register, but the init callback already does more than that: it
also initialises the per-namespace vsock state through vsock_net_init().
Rename them to vsock_pernet_ops, vsock_pernet_init and
vsock_pernet_exit, so that later per-namespace work can be placed here
too.
No functional change.
Signed-off-by: Bobby Eshleman <bobbyeshleman@xxxxxxxx>
---
net/vmw_vsock/af_vsock.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index f4f091b2a6e3..f7dbef8cf6e7 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -3036,7 +3036,7 @@ static void vsock_net_init(struct net *net)
net->vsock.g2h_fallback = 1;
}
-static __net_init int vsock_sysctl_init_net(struct net *net)
+static __net_init int vsock_pernet_init(struct net *net)
{
vsock_net_init(net);
@@ -3046,14 +3046,14 @@ static __net_init int vsock_sysctl_init_net(struct net *net)
return 0;
}
-static __net_exit void vsock_sysctl_exit_net(struct net *net)
+static __net_exit void vsock_pernet_exit(struct net *net)
{
vsock_sysctl_unregister(net);
}
-static struct pernet_operations vsock_sysctl_ops = {
- .init = vsock_sysctl_init_net,
- .exit = vsock_sysctl_exit_net,
+static struct pernet_operations vsock_pernet_ops = {
+ .init = vsock_pernet_init,
+ .exit = vsock_pernet_exit,
};
static int __init vsock_init(void)
@@ -3083,7 +3083,7 @@ static int __init vsock_init(void)
goto err_unregister_proto;
}
- if (register_pernet_subsys(&vsock_sysctl_ops)) {
+ if (register_pernet_subsys(&vsock_pernet_ops)) {
err = -ENOMEM;
goto err_unregister_sock;
}
@@ -3107,7 +3107,7 @@ static void __exit vsock_exit(void)
misc_deregister(&vsock_device);
sock_unregister(AF_VSOCK);
proto_unregister(&vsock_proto);
- unregister_pernet_subsys(&vsock_sysctl_ops);
+ unregister_pernet_subsys(&vsock_pernet_ops);
}
const struct vsock_transport *vsock_core_get_transport(struct vsock_sock *vsk)
--
2.53.0-Meta