blob: 9e5a06e78d0290870a5504e0ba277de476beae5a [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _LINUX_FS_STRUCT_H
2#define _LINUX_FS_STRUCT_H
3
Jan Blunck6ac08c32008-02-14 19:34:38 -08004#include <linux/path.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07005
6struct fs_struct {
7 atomic_t count;
8 rwlock_t lock;
9 int umask;
Al Viro7f2da1e2008-05-10 20:44:54 -040010 struct path root, pwd;
Linus Torvalds1da177e2005-04-16 15:20:36 -070011};
12
13#define INIT_FS { \
14 .count = ATOMIC_INIT(1), \
15 .lock = RW_LOCK_UNLOCKED, \
16 .umask = 0022, \
17}
18
Christoph Lameteraa362a82006-12-06 20:32:54 -080019extern struct kmem_cache *fs_cachep;
20
Linus Torvalds1da177e2005-04-16 15:20:36 -070021extern void exit_fs(struct task_struct *);
Jan Blunckac748a02008-02-14 19:34:39 -080022extern void set_fs_root(struct fs_struct *, struct path *);
23extern void set_fs_pwd(struct fs_struct *, struct path *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070024extern struct fs_struct *copy_fs_struct(struct fs_struct *);
25extern void put_fs_struct(struct fs_struct *);
26
27#endif /* _LINUX_FS_STRUCT_H */