diff options
Diffstat (limited to 'include/linux/namespacefs.h')
-rw-r--r-- | include/linux/namespacefs.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/namespacefs.h b/include/linux/namespacefs.h new file mode 100644 index 00000000000000..020bf5bbb3b534 --- /dev/null +++ b/include/linux/namespacefs.h @@ -0,0 +1,32 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * namespacefs.h - a pseudo file system for examining namespaces. + */ + +#ifndef _NAMESPACEFS_H_ +#define _NAMESPACEFS_H_ + +#ifdef CONFIG_NAMESPACE_FS + +#include <linux/fs.h> + +int namespacefs_create_pid_ns_dir(struct pid_namespace *ns); + +void namespacefs_remove_pid_ns_dir(struct pid_namespace *ns); + +#else + +static inline int +namespacefs_create_pid_ns_dir(struct pid_namespace *ns) +{ + return 0; +} + +static inline void +namespacefs_remove_pid_ns_dir(struct pid_namespace *ns) +{ +} + +#endif /* CONFIG_NAMESPACE_FS */ + +#endif |