mnt_namespace.h 939 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef _NAMESPACE_H_
  2. #define _NAMESPACE_H_
  3. #ifdef __KERNEL__
  4. #include <linux/path.h>
  5. #include <linux/seq_file.h>
  6. #include <linux/wait.h>
  7. struct mnt_namespace {
  8. atomic_t count;
  9. struct vfsmount * root;
  10. struct list_head list;
  11. wait_queue_head_t poll;
  12. int event;
  13. };
  14. struct proc_mounts {
  15. struct seq_file m; /* must be the first element */
  16. struct mnt_namespace *ns;
  17. struct path root;
  18. int event;
  19. };
  20. struct fs_struct;
  21. extern struct mnt_namespace *create_mnt_ns(struct vfsmount *mnt);
  22. extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *,
  23. struct fs_struct *);
  24. extern void put_mnt_ns(struct mnt_namespace *ns);
  25. static inline void get_mnt_ns(struct mnt_namespace *ns)
  26. {
  27. atomic_inc(&ns->count);
  28. }
  29. extern const struct seq_operations mounts_op;
  30. extern const struct seq_operations mountinfo_op;
  31. extern const struct seq_operations mountstats_op;
  32. extern int mnt_had_events(struct proc_mounts *);
  33. #endif
  34. #endif