fs_struct.h 732 B

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