mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 10:01:39 -05:00
ns: add to_<type>_ns() to respective headers
Every namespace type has a container_of(ns, <ns_type>, ns) static inline function that is currently not exposed in the header. So we have a bunch of places that open-code it via container_of(). Move it to the headers so we can use it directly. Reviewed-by: Aleksa Sarai <cyphar@cyphar.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
@@ -209,11 +209,6 @@ void put_ipc_ns(struct ipc_namespace *ns)
|
||||
}
|
||||
}
|
||||
|
||||
static inline struct ipc_namespace *to_ipc_ns(struct ns_common *ns)
|
||||
{
|
||||
return container_of(ns, struct ipc_namespace, ns);
|
||||
}
|
||||
|
||||
static struct ns_common *ipcns_get(struct task_struct *task)
|
||||
{
|
||||
struct ipc_namespace *ns = NULL;
|
||||
|
||||
Reference in New Issue
Block a user