summaryrefslogtreecommitdiff
path: root/include/linux/ns_common.h
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2025-09-17 12:28:08 +0200
committerChristian Brauner <brauner@kernel.org>2025-09-19 16:22:36 +0200
commitbe5f21d3985f00827e09b798f7a07ebd6dd7f54a (patch)
treea40d44f79e5762729dee07a3ee2373eb74568ec5 /include/linux/ns_common.h
parent5612ff3ec588be09f11a9424db6d1186bcdeb3fa (diff)
downloadlwn-be5f21d3985f00827e09b798f7a07ebd6dd7f54a.tar.gz
lwn-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 <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/linux/ns_common.h')
-rw-r--r--include/linux/ns_common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/ns_common.h b/include/linux/ns_common.h
index 05c7a7dd211b..19833ac547f9 100644
--- a/include/linux/ns_common.h
+++ b/include/linux/ns_common.h
@@ -41,6 +41,7 @@ struct ns_common {
};
int __ns_common_init(struct ns_common *ns, const struct proc_ns_operations *ops, int inum);
+void __ns_common_free(struct ns_common *ns);
#define to_ns_common(__ns) \
_Generic((__ns), \
@@ -80,4 +81,6 @@ int __ns_common_init(struct ns_common *ns, const struct proc_ns_operations *ops,
#define ns_common_init_inum(__ns, __ops, __inum) __ns_common_init(to_ns_common(__ns), __ops, __inum)
+#define ns_common_free(__ns) __ns_common_free(to_ns_common((__ns)))
+
#endif