blob: 18b467dbe278bf4b399274ff272355d2984530ce [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 {
David Howells795e2fe2009-03-28 23:23:01 +00007 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 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070011 rwlock_t lock;
12 int umask;
Al Viro7f2da1e2008-05-10 20:44:54 -040013 struct path root, pwd;
Linus Torvalds1da177e2005-04-16 15:20:36 -070014};
15
Christoph Lameteraa362a82006-12-06 20:32:54 -080016extern struct kmem_cache *fs_cachep;
17
Linus Torvalds1da177e2005-04-16 15:20:36 -070018extern void exit_fs(struct task_struct *);
Jan Blunckac748a02008-02-14 19:34:39 -080019extern void set_fs_root(struct fs_struct *, struct path *);
20extern void set_fs_pwd(struct fs_struct *, struct path *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070021extern struct fs_struct *copy_fs_struct(struct fs_struct *);
22extern void put_fs_struct(struct fs_struct *);
23
24#endif /* _LINUX_FS_STRUCT_H */