blob: 282f542191294112610661ac76f0e5fa015435f8 [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;
Jan Blunck6ac08c32008-02-14 19:34:38 -080010 struct path root, pwd, altroot;
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 *);
22extern void set_fs_altroot(void);
Jan Blunckac748a02008-02-14 19:34:39 -080023extern void set_fs_root(struct fs_struct *, struct path *);
24extern void set_fs_pwd(struct fs_struct *, struct path *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070025extern struct fs_struct *copy_fs_struct(struct fs_struct *);
26extern void put_fs_struct(struct fs_struct *);
27
28#endif /* _LINUX_FS_STRUCT_H */