mnt_namespace.h 824 B

123456789101112131415161718192021222324252627282930313233343536373839
  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 *copy_mnt_ns(unsigned long, struct mnt_namespace *,
  22. struct fs_struct *);
  23. extern void put_mnt_ns(struct mnt_namespace *ns);
  24. static inline void get_mnt_ns(struct mnt_namespace *ns)
  25. {
  26. atomic_inc(&ns->count);
  27. }
  28. extern const struct seq_operations mounts_op;
  29. extern const struct seq_operations mountinfo_op;
  30. extern const struct seq_operations mountstats_op;
  31. #endif
  32. #endif