aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/net_namespace.c
diff options
context:
space:
mode:
authorChristian Brauner <[email protected]>2025-09-17 10:28:08 +0000
committerChristian Brauner <[email protected]>2025-09-19 14:22:36 +0000
commitbe5f21d3985f00827e09b798f7a07ebd6dd7f54a (patch)
treea40d44f79e5762729dee07a3ee2373eb74568ec5 /net/core/net_namespace.c
parentnscommon: simplify initialization (diff)
downloadkernel-be5f21d3985f00827e09b798f7a07ebd6dd7f54a.tar.gz
kernel-be5f21d3985f00827e09b798f7a07ebd6dd7f54a.zip
ns: add ns_common_free()
And drop ns_free_inum(). Anything common that can be wasted centrally should be wasted in the new common helper. Reviewed-by: Jan Kara <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'net/core/net_namespace.c')
-rw-r--r--net/core/net_namespace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index e50897fba8cd..a6a3de56a81c 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -590,7 +590,7 @@ struct net *copy_net_ns(unsigned long flags,
if (rv < 0) {
put_userns:
- ns_free_inum(&net->ns);
+ ns_common_free(net);
#ifdef CONFIG_KEYS
key_remove_domain(net->key_domain);
#endif
@@ -713,7 +713,7 @@ static void cleanup_net(struct work_struct *work)
/* Finally it is safe to free my network namespace structure */
list_for_each_entry_safe(net, tmp, &net_exit_list, exit_list) {
list_del_init(&net->exit_list);
- ns_free_inum(&net->ns);
+ ns_common_free(net);
dec_net_namespaces(net->ucounts);
#ifdef CONFIG_KEYS
key_remove_domain(net->key_domain);