mnt_namespace.h 824 字节
Newer Older
1 2 3 4
#ifndef _NAMESPACE_H_
#define _NAMESPACE_H_
#ifdef __KERNEL__

A
Alexey Dobriyan 已提交
5
#include <linux/path.h>
6
#include <linux/seq_file.h>
A
Alexey Dobriyan 已提交
7
#include <linux/wait.h>
8 9 10 11 12 13 14 15 16

struct mnt_namespace {
	atomic_t		count;
	struct vfsmount *	root;
	struct list_head	list;
	wait_queue_head_t poll;
	int event;
};

17 18 19 20 21 22 23
struct proc_mounts {
	struct seq_file m; /* must be the first element */
	struct mnt_namespace *ns;
	struct path root;
	int event;
};

24 25
struct fs_struct;

26
extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *,
27
		struct fs_struct *);
28
extern void put_mnt_ns(struct mnt_namespace *ns);
29 30 31 32 33
static inline void get_mnt_ns(struct mnt_namespace *ns)
{
	atomic_inc(&ns->count);
}

34
extern const struct seq_operations mounts_op;
35
extern const struct seq_operations mountinfo_op;
36 37
extern const struct seq_operations mountstats_op;

38 39
#endif
#endif