xref: /linux-6.15/include/linux/mnt_namespace.h (revision 5fcf3296)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
26b3286edSKirill Korotaev #ifndef _NAMESPACE_H_
36b3286edSKirill Korotaev #define _NAMESPACE_H_
46b3286edSKirill Korotaev #ifdef __KERNEL__
56b3286edSKirill Korotaev 
6*5fcf3296SChristian Brauner #include <linux/cleanup.h>
7*5fcf3296SChristian Brauner #include <linux/err.h>
8*5fcf3296SChristian Brauner 
90226f492SAl Viro struct mnt_namespace;
105ad4e53bSAl Viro struct fs_struct;
11771b1371SEric W. Biederman struct user_namespace;
12f2a8d52eSChristian Brauner struct ns_common;
135ad4e53bSAl Viro 
14213dd266SEric W. Biederman extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *,
15771b1371SEric W. Biederman 		struct user_namespace *, struct fs_struct *);
16616511d0STrond Myklebust extern void put_mnt_ns(struct mnt_namespace *ns);
17*5fcf3296SChristian Brauner DEFINE_FREE(put_mnt_ns, struct mnt_namespace *, if (!IS_ERR_OR_NULL(_T)) put_mnt_ns(_T))
18303cc571SChristian Brauner extern struct ns_common *from_mnt_ns(struct mnt_namespace *);
196b3286edSKirill Korotaev 
200226f492SAl Viro extern const struct file_operations proc_mounts_operations;
210226f492SAl Viro extern const struct file_operations proc_mountinfo_operations;
220226f492SAl Viro extern const struct file_operations proc_mountstats_operations;
23a1a2c409SMiklos Szeredi 
246b3286edSKirill Korotaev #endif
256b3286edSKirill Korotaev #endif
26