xref: /linux-6.15/include/linux/fs_struct.h (revision 795e2fe0)
1 #ifndef _LINUX_FS_STRUCT_H
2 #define _LINUX_FS_STRUCT_H
3 
4 #include <linux/path.h>
5 
6 struct fs_struct {
7 	atomic_t count;	/* This usage count is used by check_unsafe_exec() for
8 			 * security checking purposes - therefore it may not be
9 			 * incremented, except by clone(CLONE_FS).
10 			 */
11 	rwlock_t lock;
12 	int umask;
13 	struct path root, pwd;
14 };
15 
16 extern struct kmem_cache *fs_cachep;
17 
18 extern void exit_fs(struct task_struct *);
19 extern void set_fs_root(struct fs_struct *, struct path *);
20 extern void set_fs_pwd(struct fs_struct *, struct path *);
21 extern struct fs_struct *copy_fs_struct(struct fs_struct *);
22 extern void put_fs_struct(struct fs_struct *);
23 
24 #endif /* _LINUX_FS_STRUCT_H */
25