Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nsfs: add nsfs.h header

And move the stuff out from proc_ns.h where it really doesn't belong.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>

+27 -12
+26
include/linux/nsfs.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* Copyright (c) 2025 Christian Brauner <brauner@kernel.org> */ 3 + 4 + #ifndef _LINUX_NSFS_H 5 + #define _LINUX_NSFS_H 6 + 7 + #include <linux/ns_common.h> 8 + 9 + struct path; 10 + struct task_struct; 11 + struct proc_ns_operations; 12 + 13 + int ns_get_path(struct path *path, struct task_struct *task, 14 + const struct proc_ns_operations *ns_ops); 15 + typedef struct ns_common *ns_get_path_helper_t(void *); 16 + int ns_get_path_cb(struct path *path, ns_get_path_helper_t ns_get_cb, 17 + void *private_data); 18 + 19 + bool ns_match(const struct ns_common *ns, dev_t dev, ino_t ino); 20 + 21 + int ns_get_name(char *buf, size_t size, struct task_struct *task, 22 + const struct proc_ns_operations *ns_ops); 23 + void nsfs_init(void); 24 + 25 + #endif /* _LINUX_NSFS_H */ 26 +
+1 -12
include/linux/proc_ns.h
··· 5 5 #ifndef _LINUX_PROC_NS_H 6 6 #define _LINUX_PROC_NS_H 7 7 8 - #include <linux/ns_common.h> 8 + #include <linux/nsfs.h> 9 9 #include <uapi/linux/nsfs.h> 10 10 11 11 struct pid_namespace; ··· 75 75 #define ns_free_inum(ns) proc_free_inum((ns)->inum) 76 76 77 77 #define get_proc_ns(inode) ((struct ns_common *)(inode)->i_private) 78 - extern int ns_get_path(struct path *path, struct task_struct *task, 79 - const struct proc_ns_operations *ns_ops); 80 - typedef struct ns_common *ns_get_path_helper_t(void *); 81 - extern int ns_get_path_cb(struct path *path, ns_get_path_helper_t ns_get_cb, 82 - void *private_data); 83 - 84 - extern bool ns_match(const struct ns_common *ns, dev_t dev, ino_t ino); 85 - 86 - extern int ns_get_name(char *buf, size_t size, struct task_struct *task, 87 - const struct proc_ns_operations *ns_ops); 88 - extern void nsfs_init(void); 89 78 90 79 #endif /* _LINUX_PROC_NS_H */