fs_struct.h 702 B

12345678910111213141516171819202122232425262728
  1. #ifndef _LINUX_FS_STRUCT_H
  2. #define _LINUX_FS_STRUCT_H
  3. #include <linux/path.h>
  4. struct fs_struct {
  5. atomic_t count;
  6. rwlock_t lock;
  7. int umask;
  8. struct path root, pwd, altroot;
  9. };
  10. #define INIT_FS { \
  11. .count = ATOMIC_INIT(1), \
  12. .lock = RW_LOCK_UNLOCKED, \
  13. .umask = 0022, \
  14. }
  15. extern struct kmem_cache *fs_cachep;
  16. extern void exit_fs(struct task_struct *);
  17. extern void set_fs_altroot(void);
  18. extern void set_fs_root(struct fs_struct *, struct vfsmount *, struct dentry *);
  19. extern void set_fs_pwd(struct fs_struct *, struct vfsmount *, struct dentry *);
  20. extern struct fs_struct *copy_fs_struct(struct fs_struct *);
  21. extern void put_fs_struct(struct fs_struct *);
  22. #endif /* _LINUX_FS_STRUCT_H */