blob: 78a05bfcd8ebd6075b2add0da9da064804e645d6 [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 {
Al Viro498052b2009-03-30 07:20:30 -04007 int users;
Linus Torvalds1da177e2005-04-16 15:20:36 -07008 rwlock_t lock;
9 int umask;
Al Viro498052b2009-03-30 07:20:30 -040010 int in_exec;
Al Viro7f2da1e2008-05-10 20:44:54 -040011 struct path root, pwd;
Linus Torvalds1da177e2005-04-16 15:20:36 -070012};
13
Christoph Lameteraa362a82006-12-06 20:32:54 -080014extern struct kmem_cache *fs_cachep;
15
Linus Torvalds1da177e2005-04-16 15:20:36 -070016extern void exit_fs(struct task_struct *);
Jan Blunckac748a02008-02-14 19:34:39 -080017extern void set_fs_root(struct fs_struct *, struct path *);
18extern void set_fs_pwd(struct fs_struct *, struct path *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070019extern struct fs_struct *copy_fs_struct(struct fs_struct *);
Al Viro498052b2009-03-30 07:20:30 -040020extern void free_fs_struct(struct fs_struct *);
Al Viro3e93cd62009-03-29 19:00:13 -040021extern void daemonize_fs_struct(void);
22extern int unshare_fs_struct(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070023
24#endif /* _LINUX_FS_STRUCT_H */