Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _LINUX_FS_STRUCT_H |
| 2 | #define _LINUX_FS_STRUCT_H |
| 3 | |
Jan Blunck | 6ac08c3 | 2008-02-14 19:34:38 -0800 | [diff] [blame] | 4 | #include <linux/path.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | |
| 6 | struct fs_struct { |
Al Viro | 498052b | 2009-03-30 07:20:30 -0400 | [diff] [blame] | 7 | int users; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | rwlock_t lock; |
| 9 | int umask; |
Al Viro | 498052b | 2009-03-30 07:20:30 -0400 | [diff] [blame] | 10 | int in_exec; |
Al Viro | 7f2da1e | 2008-05-10 20:44:54 -0400 | [diff] [blame] | 11 | struct path root, pwd; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | }; |
| 13 | |
Christoph Lameter | aa362a8 | 2006-12-06 20:32:54 -0800 | [diff] [blame] | 14 | extern struct kmem_cache *fs_cachep; |
| 15 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | extern void exit_fs(struct task_struct *); |
Jan Blunck | ac748a0 | 2008-02-14 19:34:39 -0800 | [diff] [blame] | 17 | extern void set_fs_root(struct fs_struct *, struct path *); |
| 18 | extern void set_fs_pwd(struct fs_struct *, struct path *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | extern struct fs_struct *copy_fs_struct(struct fs_struct *); |
Al Viro | 498052b | 2009-03-30 07:20:30 -0400 | [diff] [blame] | 20 | extern void free_fs_struct(struct fs_struct *); |
Al Viro | 3e93cd6 | 2009-03-29 19:00:13 -0400 | [diff] [blame] | 21 | extern void daemonize_fs_struct(void); |
| 22 | extern int unshare_fs_struct(void); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | |
| 24 | #endif /* _LINUX_FS_STRUCT_H */ |