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 { |
| 7 | atomic_t count; |
| 8 | rwlock_t lock; |
| 9 | int umask; |
Jan Blunck | 6ac08c3 | 2008-02-14 19:34:38 -0800 | [diff] [blame] | 10 | struct path root, pwd, altroot; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | }; |
| 12 | |
| 13 | #define INIT_FS { \ |
| 14 | .count = ATOMIC_INIT(1), \ |
| 15 | .lock = RW_LOCK_UNLOCKED, \ |
| 16 | .umask = 0022, \ |
| 17 | } |
| 18 | |
Christoph Lameter | aa362a8 | 2006-12-06 20:32:54 -0800 | [diff] [blame] | 19 | extern struct kmem_cache *fs_cachep; |
| 20 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | extern void exit_fs(struct task_struct *); |
| 22 | extern void set_fs_altroot(void); |
Jan Blunck | ac748a0 | 2008-02-14 19:34:39 -0800 | [diff] [blame] | 23 | extern void set_fs_root(struct fs_struct *, struct path *); |
| 24 | extern void set_fs_pwd(struct fs_struct *, struct path *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | extern struct fs_struct *copy_fs_struct(struct fs_struct *); |
| 26 | extern void put_fs_struct(struct fs_struct *); |
| 27 | |
| 28 | #endif /* _LINUX_FS_STRUCT_H */ |