mac80211: fix wext bssid/ssid setting
[linux-2.6/verdex.git] / include / linux / mnt_namespace.h
blob3a059298cc197e9c470c47d6338931557fd6ec43
1 #ifndef _NAMESPACE_H_
2 #define _NAMESPACE_H_
3 #ifdef __KERNEL__
5 #include <linux/mount.h>
6 #include <linux/sched.h>
7 #include <linux/nsproxy.h>
8 #include <linux/seq_file.h>
10 struct mnt_namespace {
11 atomic_t count;
12 struct vfsmount * root;
13 struct list_head list;
14 wait_queue_head_t poll;
15 int event;
18 struct proc_mounts {
19 struct seq_file m; /* must be the first element */
20 struct mnt_namespace *ns;
21 struct path root;
22 int event;
25 struct fs_struct;
27 extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *,
28 struct fs_struct *);
29 extern void __put_mnt_ns(struct mnt_namespace *ns);
31 static inline void put_mnt_ns(struct mnt_namespace *ns)
33 if (atomic_dec_and_lock(&ns->count, &vfsmount_lock))
34 /* releases vfsmount_lock */
35 __put_mnt_ns(ns);
38 static inline void exit_mnt_ns(struct task_struct *p)
40 struct mnt_namespace *ns = p->nsproxy->mnt_ns;
41 if (ns)
42 put_mnt_ns(ns);
45 static inline void get_mnt_ns(struct mnt_namespace *ns)
47 atomic_inc(&ns->count);
50 extern const struct seq_operations mounts_op;
51 extern const struct seq_operations mountinfo_op;
52 extern const struct seq_operations mountstats_op;
54 #endif
55 #endif