aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorKirill Korotaev <dev@sw.ru>2006-12-08 05:37:56 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:28:51 -0500
commit6b3286ed1169d74fea401367d6d4d6c6ec758a81 (patch)
treefaf5beddb797875bb92855f8606735478267959a /fs
parent1ec320afdc9552c92191d5f89fcd1ebe588334ca (diff)
[PATCH] rename struct namespace to struct mnt_namespace
Rename 'struct namespace' to 'struct mnt_namespace' to avoid confusion with other namespaces being developped for the containers : pid, uts, ipc, etc. 'namespace' variables and attributes are also renamed to 'mnt_ns' Signed-off-by: Kirill Korotaev <dev@sw.ru> Signed-off-by: Cedric Le Goater <clg@fr.ibm.com> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Herbert Poetzl <herbert@13thfloor.at> Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/afs/mntpt.c2
-rw-r--r--fs/namespace.c113
-rw-r--r--fs/nfs/getroot.c2
-rw-r--r--fs/pnode.c2
-rw-r--r--fs/pnode.h2
-rw-r--r--fs/proc/base.c36
-rw-r--r--fs/reiserfs/super.c2
7 files changed, 80 insertions, 79 deletions
diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c
index f33b1a81a761..8f74e8450826 100644
--- a/fs/afs/mntpt.c
+++ b/fs/afs/mntpt.c
@@ -18,7 +18,7 @@
18#include <linux/pagemap.h> 18#include <linux/pagemap.h>
19#include <linux/mount.h> 19#include <linux/mount.h>
20#include <linux/namei.h> 20#include <linux/namei.h>
21#include <linux/namespace.h> 21#include <linux/mnt_namespace.h>
22#include "super.h" 22#include "super.h"
23#include "cell.h" 23#include "cell.h"
24#include "volume.h" 24#include "volume.h"
diff --git a/fs/namespace.c b/fs/namespace.c
index b00ac84ebbdd..fde8553faa76 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -20,7 +20,7 @@
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/sysfs.h> 21#include <linux/sysfs.h>
22#include <linux/seq_file.h> 22#include <linux/seq_file.h>
23#include <linux/namespace.h> 23#include <linux/mnt_namespace.h>
24#include <linux/namei.h> 24#include <linux/namei.h>
25#include <linux/security.h> 25#include <linux/security.h>
26#include <linux/mount.h> 26#include <linux/mount.h>
@@ -133,10 +133,10 @@ struct vfsmount *lookup_mnt(struct vfsmount *mnt, struct dentry *dentry)
133 133
134static inline int check_mnt(struct vfsmount *mnt) 134static inline int check_mnt(struct vfsmount *mnt)
135{ 135{
136 return mnt->mnt_namespace == current->nsproxy->namespace; 136 return mnt->mnt_ns == current->nsproxy->mnt_ns;
137} 137}
138 138
139static void touch_namespace(struct namespace *ns) 139static void touch_mnt_namespace(struct mnt_namespace *ns)
140{ 140{
141 if (ns) { 141 if (ns) {
142 ns->event = ++event; 142 ns->event = ++event;
@@ -144,7 +144,7 @@ static void touch_namespace(struct namespace *ns)
144 } 144 }
145} 145}
146 146
147static void __touch_namespace(struct namespace *ns) 147static void __touch_mnt_namespace(struct mnt_namespace *ns)
148{ 148{
149 if (ns && ns->event != event) { 149 if (ns && ns->event != event) {
150 ns->event = event; 150 ns->event = event;
@@ -187,19 +187,19 @@ static void commit_tree(struct vfsmount *mnt)
187 struct vfsmount *parent = mnt->mnt_parent; 187 struct vfsmount *parent = mnt->mnt_parent;
188 struct vfsmount *m; 188 struct vfsmount *m;
189 LIST_HEAD(head); 189 LIST_HEAD(head);
190 struct namespace *n = parent->mnt_namespace; 190 struct mnt_namespace *n = parent->mnt_ns;
191 191
192 BUG_ON(parent == mnt); 192 BUG_ON(parent == mnt);
193 193
194 list_add_tail(&head, &mnt->mnt_list); 194 list_add_tail(&head, &mnt->mnt_list);
195 list_for_each_entry(m, &head, mnt_list) 195 list_for_each_entry(m, &head, mnt_list)
196 m->mnt_namespace = n; 196 m->mnt_ns = n;
197 list_splice(&head, n->list.prev); 197 list_splice(&head, n->list.prev);
198 198
199 list_add_tail(&mnt->mnt_hash, mount_hashtable + 199 list_add_tail(&mnt->mnt_hash, mount_hashtable +
200 hash(parent, mnt->mnt_mountpoint)); 200 hash(parent, mnt->mnt_mountpoint));
201 list_add_tail(&mnt->mnt_child, &parent->mnt_mounts); 201 list_add_tail(&mnt->mnt_child, &parent->mnt_mounts);
202 touch_namespace(n); 202 touch_mnt_namespace(n);
203} 203}
204 204
205static struct vfsmount *next_mnt(struct vfsmount *p, struct vfsmount *root) 205static struct vfsmount *next_mnt(struct vfsmount *p, struct vfsmount *root)
@@ -320,7 +320,7 @@ EXPORT_SYMBOL(mnt_unpin);
320/* iterator */ 320/* iterator */
321static void *m_start(struct seq_file *m, loff_t *pos) 321static void *m_start(struct seq_file *m, loff_t *pos)
322{ 322{
323 struct namespace *n = m->private; 323 struct mnt_namespace *n = m->private;
324 struct list_head *p; 324 struct list_head *p;
325 loff_t l = *pos; 325 loff_t l = *pos;
326 326
@@ -333,7 +333,7 @@ static void *m_start(struct seq_file *m, loff_t *pos)
333 333
334static void *m_next(struct seq_file *m, void *v, loff_t *pos) 334static void *m_next(struct seq_file *m, void *v, loff_t *pos)
335{ 335{
336 struct namespace *n = m->private; 336 struct mnt_namespace *n = m->private;
337 struct list_head *p = ((struct vfsmount *)v)->mnt_list.next; 337 struct list_head *p = ((struct vfsmount *)v)->mnt_list.next;
338 (*pos)++; 338 (*pos)++;
339 return p == &n->list ? NULL : list_entry(p, struct vfsmount, mnt_list); 339 return p == &n->list ? NULL : list_entry(p, struct vfsmount, mnt_list);
@@ -526,8 +526,8 @@ void umount_tree(struct vfsmount *mnt, int propagate, struct list_head *kill)
526 list_for_each_entry(p, kill, mnt_hash) { 526 list_for_each_entry(p, kill, mnt_hash) {
527 list_del_init(&p->mnt_expire); 527 list_del_init(&p->mnt_expire);
528 list_del_init(&p->mnt_list); 528 list_del_init(&p->mnt_list);
529 __touch_namespace(p->mnt_namespace); 529 __touch_mnt_namespace(p->mnt_ns);
530 p->mnt_namespace = NULL; 530 p->mnt_ns = NULL;
531 list_del_init(&p->mnt_child); 531 list_del_init(&p->mnt_child);
532 if (p->mnt_parent != p) 532 if (p->mnt_parent != p)
533 p->mnt_mountpoint->d_mounted--; 533 p->mnt_mountpoint->d_mounted--;
@@ -830,7 +830,7 @@ static int attach_recursive_mnt(struct vfsmount *source_mnt,
830 if (parent_nd) { 830 if (parent_nd) {
831 detach_mnt(source_mnt, parent_nd); 831 detach_mnt(source_mnt, parent_nd);
832 attach_mnt(source_mnt, nd); 832 attach_mnt(source_mnt, nd);
833 touch_namespace(current->nsproxy->namespace); 833 touch_mnt_namespace(current->nsproxy->mnt_ns);
834 } else { 834 } else {
835 mnt_set_mountpoint(dest_mnt, dest_dentry, source_mnt); 835 mnt_set_mountpoint(dest_mnt, dest_dentry, source_mnt);
836 commit_tree(source_mnt); 836 commit_tree(source_mnt);
@@ -1145,9 +1145,9 @@ static void expire_mount(struct vfsmount *mnt, struct list_head *mounts,
1145 */ 1145 */
1146 if (!propagate_mount_busy(mnt, 2)) { 1146 if (!propagate_mount_busy(mnt, 2)) {
1147 /* delete from the namespace */ 1147 /* delete from the namespace */
1148 touch_namespace(mnt->mnt_namespace); 1148 touch_mnt_namespace(mnt->mnt_ns);
1149 list_del_init(&mnt->mnt_list); 1149 list_del_init(&mnt->mnt_list);
1150 mnt->mnt_namespace = NULL; 1150 mnt->mnt_ns = NULL;
1151 umount_tree(mnt, 1, umounts); 1151 umount_tree(mnt, 1, umounts);
1152 spin_unlock(&vfsmount_lock); 1152 spin_unlock(&vfsmount_lock);
1153 } else { 1153 } else {
@@ -1168,7 +1168,7 @@ static void expire_mount(struct vfsmount *mnt, struct list_head *mounts,
1168 */ 1168 */
1169static void expire_mount_list(struct list_head *graveyard, struct list_head *mounts) 1169static void expire_mount_list(struct list_head *graveyard, struct list_head *mounts)
1170{ 1170{
1171 struct namespace *namespace; 1171 struct mnt_namespace *ns;
1172 struct vfsmount *mnt; 1172 struct vfsmount *mnt;
1173 1173
1174 while (!list_empty(graveyard)) { 1174 while (!list_empty(graveyard)) {
@@ -1178,10 +1178,10 @@ static void expire_mount_list(struct list_head *graveyard, struct list_head *mou
1178 1178
1179 /* don't do anything if the namespace is dead - all the 1179 /* don't do anything if the namespace is dead - all the
1180 * vfsmounts from it are going away anyway */ 1180 * vfsmounts from it are going away anyway */
1181 namespace = mnt->mnt_namespace; 1181 ns = mnt->mnt_ns;
1182 if (!namespace || !namespace->root) 1182 if (!ns || !ns->root)
1183 continue; 1183 continue;
1184 get_namespace(namespace); 1184 get_mnt_ns(ns);
1185 1185
1186 spin_unlock(&vfsmount_lock); 1186 spin_unlock(&vfsmount_lock);
1187 down_write(&namespace_sem); 1187 down_write(&namespace_sem);
@@ -1189,7 +1189,7 @@ static void expire_mount_list(struct list_head *graveyard, struct list_head *mou
1189 up_write(&namespace_sem); 1189 up_write(&namespace_sem);
1190 release_mounts(&umounts); 1190 release_mounts(&umounts);
1191 mntput(mnt); 1191 mntput(mnt);
1192 put_namespace(namespace); 1192 put_mnt_ns(ns);
1193 spin_lock(&vfsmount_lock); 1193 spin_lock(&vfsmount_lock);
1194 } 1194 }
1195} 1195}
@@ -1439,14 +1439,15 @@ dput_out:
1439 * Allocate a new namespace structure and populate it with contents 1439 * Allocate a new namespace structure and populate it with contents
1440 * copied from the namespace of the passed in task structure. 1440 * copied from the namespace of the passed in task structure.
1441 */ 1441 */
1442struct namespace *dup_namespace(struct task_struct *tsk, struct fs_struct *fs) 1442struct mnt_namespace *dup_mnt_ns(struct task_struct *tsk,
1443 struct fs_struct *fs)
1443{ 1444{
1444 struct namespace *namespace = tsk->nsproxy->namespace; 1445 struct mnt_namespace *mnt_ns = tsk->nsproxy->mnt_ns;
1445 struct namespace *new_ns; 1446 struct mnt_namespace *new_ns;
1446 struct vfsmount *rootmnt = NULL, *pwdmnt = NULL, *altrootmnt = NULL; 1447 struct vfsmount *rootmnt = NULL, *pwdmnt = NULL, *altrootmnt = NULL;
1447 struct vfsmount *p, *q; 1448 struct vfsmount *p, *q;
1448 1449
1449 new_ns = kmalloc(sizeof(struct namespace), GFP_KERNEL); 1450 new_ns = kmalloc(sizeof(struct mnt_namespace), GFP_KERNEL);
1450 if (!new_ns) 1451 if (!new_ns)
1451 return NULL; 1452 return NULL;
1452 1453
@@ -1457,7 +1458,7 @@ struct namespace *dup_namespace(struct task_struct *tsk, struct fs_struct *fs)
1457 1458
1458 down_write(&namespace_sem); 1459 down_write(&namespace_sem);
1459 /* First pass: copy the tree topology */ 1460 /* First pass: copy the tree topology */
1460 new_ns->root = copy_tree(namespace->root, namespace->root->mnt_root, 1461 new_ns->root = copy_tree(mnt_ns->root, mnt_ns->root->mnt_root,
1461 CL_COPY_ALL | CL_EXPIRE); 1462 CL_COPY_ALL | CL_EXPIRE);
1462 if (!new_ns->root) { 1463 if (!new_ns->root) {
1463 up_write(&namespace_sem); 1464 up_write(&namespace_sem);
@@ -1473,10 +1474,10 @@ struct namespace *dup_namespace(struct task_struct *tsk, struct fs_struct *fs)
1473 * as belonging to new namespace. We have already acquired a private 1474 * as belonging to new namespace. We have already acquired a private
1474 * fs_struct, so tsk->fs->lock is not needed. 1475 * fs_struct, so tsk->fs->lock is not needed.
1475 */ 1476 */
1476 p = namespace->root; 1477 p = mnt_ns->root;
1477 q = new_ns->root; 1478 q = new_ns->root;
1478 while (p) { 1479 while (p) {
1479 q->mnt_namespace = new_ns; 1480 q->mnt_ns = new_ns;
1480 if (fs) { 1481 if (fs) {
1481 if (p == fs->rootmnt) { 1482 if (p == fs->rootmnt) {
1482 rootmnt = p; 1483 rootmnt = p;
@@ -1491,7 +1492,7 @@ struct namespace *dup_namespace(struct task_struct *tsk, struct fs_struct *fs)
1491 fs->altrootmnt = mntget(q); 1492 fs->altrootmnt = mntget(q);
1492 } 1493 }
1493 } 1494 }
1494 p = next_mnt(p, namespace->root); 1495 p = next_mnt(p, mnt_ns->root);
1495 q = next_mnt(q, new_ns->root); 1496 q = next_mnt(q, new_ns->root);
1496 } 1497 }
1497 up_write(&namespace_sem); 1498 up_write(&namespace_sem);
@@ -1506,16 +1507,16 @@ struct namespace *dup_namespace(struct task_struct *tsk, struct fs_struct *fs)
1506 return new_ns; 1507 return new_ns;
1507} 1508}
1508 1509
1509int copy_namespace(int flags, struct task_struct *tsk) 1510int copy_mnt_ns(int flags, struct task_struct *tsk)
1510{ 1511{
1511 struct namespace *namespace = tsk->nsproxy->namespace; 1512 struct mnt_namespace *ns = tsk->nsproxy->mnt_ns;
1512 struct namespace *new_ns; 1513 struct mnt_namespace *new_ns;
1513 int err = 0; 1514 int err = 0;
1514 1515
1515 if (!namespace) 1516 if (!ns)
1516 return 0; 1517 return 0;
1517 1518
1518 get_namespace(namespace); 1519 get_mnt_ns(ns);
1519 1520
1520 if (!(flags & CLONE_NEWNS)) 1521 if (!(flags & CLONE_NEWNS))
1521 return 0; 1522 return 0;
@@ -1525,16 +1526,16 @@ int copy_namespace(int flags, struct task_struct *tsk)
1525 goto out; 1526 goto out;
1526 } 1527 }
1527 1528
1528 new_ns = dup_namespace(tsk, tsk->fs); 1529 new_ns = dup_mnt_ns(tsk, tsk->fs);
1529 if (!new_ns) { 1530 if (!new_ns) {
1530 err = -ENOMEM; 1531 err = -ENOMEM;
1531 goto out; 1532 goto out;
1532 } 1533 }
1533 1534
1534 tsk->nsproxy->namespace = new_ns; 1535 tsk->nsproxy->mnt_ns = new_ns;
1535 1536
1536out: 1537out:
1537 put_namespace(namespace); 1538 put_mnt_ns(ns);
1538 return err; 1539 return err;
1539} 1540}
1540 1541
@@ -1754,7 +1755,7 @@ asmlinkage long sys_pivot_root(const char __user * new_root,
1754 detach_mnt(user_nd.mnt, &root_parent); 1755 detach_mnt(user_nd.mnt, &root_parent);
1755 attach_mnt(user_nd.mnt, &old_nd); /* mount old root on put_old */ 1756 attach_mnt(user_nd.mnt, &old_nd); /* mount old root on put_old */
1756 attach_mnt(new_nd.mnt, &root_parent); /* mount new_root on / */ 1757 attach_mnt(new_nd.mnt, &root_parent); /* mount new_root on / */
1757 touch_namespace(current->nsproxy->namespace); 1758 touch_mnt_namespace(current->nsproxy->mnt_ns);
1758 spin_unlock(&vfsmount_lock); 1759 spin_unlock(&vfsmount_lock);
1759 chroot_fs_refs(&user_nd, &new_nd); 1760 chroot_fs_refs(&user_nd, &new_nd);
1760 security_sb_post_pivotroot(&user_nd, &new_nd); 1761 security_sb_post_pivotroot(&user_nd, &new_nd);
@@ -1779,27 +1780,27 @@ out3:
1779static void __init init_mount_tree(void) 1780static void __init init_mount_tree(void)
1780{ 1781{
1781 struct vfsmount *mnt; 1782 struct vfsmount *mnt;
1782 struct namespace *namespace; 1783 struct mnt_namespace *ns;
1783 1784
1784 mnt = do_kern_mount("rootfs", 0, "rootfs", NULL); 1785 mnt = do_kern_mount("rootfs", 0, "rootfs", NULL);
1785 if (IS_ERR(mnt)) 1786 if (IS_ERR(mnt))
1786 panic("Can't create rootfs"); 1787 panic("Can't create rootfs");
1787 namespace = kmalloc(sizeof(*namespace), GFP_KERNEL); 1788 ns = kmalloc(sizeof(*ns), GFP_KERNEL);
1788 if (!namespace) 1789 if (!ns)
1789 panic("Can't allocate initial namespace"); 1790 panic("Can't allocate initial namespace");
1790 atomic_set(&namespace->count, 1); 1791 atomic_set(&ns->count, 1);
1791 INIT_LIST_HEAD(&namespace->list); 1792 INIT_LIST_HEAD(&ns->list);
1792 init_waitqueue_head(&namespace->poll); 1793 init_waitqueue_head(&ns->poll);
1793 namespace->event = 0; 1794 ns->event = 0;
1794 list_add(&mnt->mnt_list, &namespace->list); 1795 list_add(&mnt->mnt_list, &ns->list);
1795 namespace->root = mnt; 1796 ns->root = mnt;
1796 mnt->mnt_namespace = namespace; 1797 mnt->mnt_ns = ns;
1797 1798
1798 init_task.nsproxy->namespace = namespace; 1799 init_task.nsproxy->mnt_ns = ns;
1799 get_namespace(namespace); 1800 get_mnt_ns(ns);
1800 1801
1801 set_fs_pwd(current->fs, namespace->root, namespace->root->mnt_root); 1802 set_fs_pwd(current->fs, ns->root, ns->root->mnt_root);
1802 set_fs_root(current->fs, namespace->root, namespace->root->mnt_root); 1803 set_fs_root(current->fs, ns->root, ns->root->mnt_root);
1803} 1804}
1804 1805
1805void __init mnt_init(unsigned long mempages) 1806void __init mnt_init(unsigned long mempages)
@@ -1860,11 +1861,11 @@ void __init mnt_init(unsigned long mempages)
1860 init_mount_tree(); 1861 init_mount_tree();
1861} 1862}
1862 1863
1863void __put_namespace(struct namespace *namespace) 1864void __put_mnt_ns(struct mnt_namespace *ns)
1864{ 1865{
1865 struct vfsmount *root = namespace->root; 1866 struct vfsmount *root = ns->root;
1866 LIST_HEAD(umount_list); 1867 LIST_HEAD(umount_list);
1867 namespace->root = NULL; 1868 ns->root = NULL;
1868 spin_unlock(&vfsmount_lock); 1869 spin_unlock(&vfsmount_lock);
1869 down_write(&namespace_sem); 1870 down_write(&namespace_sem);
1870 spin_lock(&vfsmount_lock); 1871 spin_lock(&vfsmount_lock);
@@ -1872,5 +1873,5 @@ void __put_namespace(struct namespace *namespace)
1872 spin_unlock(&vfsmount_lock); 1873 spin_unlock(&vfsmount_lock);
1873 up_write(&namespace_sem); 1874 up_write(&namespace_sem);
1874 release_mounts(&umount_list); 1875 release_mounts(&umount_list);
1875 kfree(namespace); 1876 kfree(ns);
1876} 1877}
diff --git a/fs/nfs/getroot.c b/fs/nfs/getroot.c
index 20c6f39ea38a..8391bd7a83ce 100644
--- a/fs/nfs/getroot.c
+++ b/fs/nfs/getroot.c
@@ -31,7 +31,7 @@
31#include <linux/nfs_idmap.h> 31#include <linux/nfs_idmap.h>
32#include <linux/vfs.h> 32#include <linux/vfs.h>
33#include <linux/namei.h> 33#include <linux/namei.h>
34#include <linux/namespace.h> 34#include <linux/mnt_namespace.h>
35#include <linux/security.h> 35#include <linux/security.h>
36 36
37#include <asm/system.h> 37#include <asm/system.h>
diff --git a/fs/pnode.c b/fs/pnode.c
index da42ee61c1df..56aacead8362 100644
--- a/fs/pnode.c
+++ b/fs/pnode.c
@@ -6,7 +6,7 @@
6 * Author : Ram Pai (linuxram@us.ibm.com) 6 * Author : Ram Pai (linuxram@us.ibm.com)
7 * 7 *
8 */ 8 */
9#include <linux/namespace.h> 9#include <linux/mnt_namespace.h>
10#include <linux/mount.h> 10#include <linux/mount.h>
11#include <linux/fs.h> 11#include <linux/fs.h>
12#include "pnode.h" 12#include "pnode.h"
diff --git a/fs/pnode.h b/fs/pnode.h
index 020e1bb60fdb..d45bd8ec36bf 100644
--- a/fs/pnode.h
+++ b/fs/pnode.h
@@ -13,7 +13,7 @@
13 13
14#define IS_MNT_SHARED(mnt) (mnt->mnt_flags & MNT_SHARED) 14#define IS_MNT_SHARED(mnt) (mnt->mnt_flags & MNT_SHARED)
15#define IS_MNT_SLAVE(mnt) (mnt->mnt_master) 15#define IS_MNT_SLAVE(mnt) (mnt->mnt_master)
16#define IS_MNT_NEW(mnt) (!mnt->mnt_namespace) 16#define IS_MNT_NEW(mnt) (!mnt->mnt_ns)
17#define CLEAR_MNT_SHARED(mnt) (mnt->mnt_flags &= ~MNT_SHARED) 17#define CLEAR_MNT_SHARED(mnt) (mnt->mnt_flags &= ~MNT_SHARED)
18#define IS_MNT_UNBINDABLE(mnt) (mnt->mnt_flags & MNT_UNBINDABLE) 18#define IS_MNT_UNBINDABLE(mnt) (mnt->mnt_flags & MNT_UNBINDABLE)
19 19
diff --git a/fs/proc/base.c b/fs/proc/base.c
index a71f1755bb57..a3b5074118a7 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -59,7 +59,7 @@
59#include <linux/string.h> 59#include <linux/string.h>
60#include <linux/seq_file.h> 60#include <linux/seq_file.h>
61#include <linux/namei.h> 61#include <linux/namei.h>
62#include <linux/namespace.h> 62#include <linux/mnt_namespace.h>
63#include <linux/mm.h> 63#include <linux/mm.h>
64#include <linux/smp_lock.h> 64#include <linux/smp_lock.h>
65#include <linux/rcupdate.h> 65#include <linux/rcupdate.h>
@@ -365,33 +365,33 @@ struct proc_mounts {
365static int mounts_open(struct inode *inode, struct file *file) 365static int mounts_open(struct inode *inode, struct file *file)
366{ 366{
367 struct task_struct *task = get_proc_task(inode); 367 struct task_struct *task = get_proc_task(inode);
368 struct namespace *namespace = NULL; 368 struct mnt_namespace *ns = NULL;
369 struct proc_mounts *p; 369 struct proc_mounts *p;
370 int ret = -EINVAL; 370 int ret = -EINVAL;
371 371
372 if (task) { 372 if (task) {
373 task_lock(task); 373 task_lock(task);
374 namespace = task->nsproxy->namespace; 374 ns = task->nsproxy->mnt_ns;
375 if (namespace) 375 if (ns)
376 get_namespace(namespace); 376 get_mnt_ns(ns);
377 task_unlock(task); 377 task_unlock(task);
378 put_task_struct(task); 378 put_task_struct(task);
379 } 379 }
380 380
381 if (namespace) { 381 if (ns) {
382 ret = -ENOMEM; 382 ret = -ENOMEM;
383 p = kmalloc(sizeof(struct proc_mounts), GFP_KERNEL); 383 p = kmalloc(sizeof(struct proc_mounts), GFP_KERNEL);
384 if (p) { 384 if (p) {
385 file->private_data = &p->m; 385 file->private_data = &p->m;
386 ret = seq_open(file, &mounts_op); 386 ret = seq_open(file, &mounts_op);
387 if (!ret) { 387 if (!ret) {
388 p->m.private = namespace; 388 p->m.private = ns;
389 p->event = namespace->event; 389 p->event = ns->event;
390 return 0; 390 return 0;
391 } 391 }
392 kfree(p); 392 kfree(p);
393 } 393 }
394 put_namespace(namespace); 394 put_mnt_ns(ns);
395 } 395 }
396 return ret; 396 return ret;
397} 397}
@@ -399,15 +399,15 @@ static int mounts_open(struct inode *inode, struct file *file)
399static int mounts_release(struct inode *inode, struct file *file) 399static int mounts_release(struct inode *inode, struct file *file)
400{ 400{
401 struct seq_file *m = file->private_data; 401 struct seq_file *m = file->private_data;
402 struct namespace *namespace = m->private; 402 struct mnt_namespace *ns = m->private;
403 put_namespace(namespace); 403 put_mnt_ns(ns);
404 return seq_release(inode, file); 404 return seq_release(inode, file);
405} 405}
406 406
407static unsigned mounts_poll(struct file *file, poll_table *wait) 407static unsigned mounts_poll(struct file *file, poll_table *wait)
408{ 408{
409 struct proc_mounts *p = file->private_data; 409 struct proc_mounts *p = file->private_data;
410 struct namespace *ns = p->m.private; 410 struct mnt_namespace *ns = p->m.private;
411 unsigned res = 0; 411 unsigned res = 0;
412 412
413 poll_wait(file, &ns->poll, wait); 413 poll_wait(file, &ns->poll, wait);
@@ -437,21 +437,21 @@ static int mountstats_open(struct inode *inode, struct file *file)
437 437
438 if (!ret) { 438 if (!ret) {
439 struct seq_file *m = file->private_data; 439 struct seq_file *m = file->private_data;
440 struct namespace *namespace = NULL; 440 struct mnt_namespace *mnt_ns = NULL;
441 struct task_struct *task = get_proc_task(inode); 441 struct task_struct *task = get_proc_task(inode);
442 442
443 if (task) { 443 if (task) {
444 task_lock(task); 444 task_lock(task);
445 if (task->nsproxy) 445 if (task->nsproxy)
446 namespace = task->nsproxy->namespace; 446 mnt_ns = task->nsproxy->mnt_ns;
447 if (namespace) 447 if (mnt_ns)
448 get_namespace(namespace); 448 get_mnt_ns(mnt_ns);
449 task_unlock(task); 449 task_unlock(task);
450 put_task_struct(task); 450 put_task_struct(task);
451 } 451 }
452 452
453 if (namespace) 453 if (mnt_ns)
454 m->private = namespace; 454 m->private = mnt_ns;
455 else { 455 else {
456 seq_release(inode, file); 456 seq_release(inode, file);
457 ret = -EINVAL; 457 ret = -EINVAL;
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 7fb5fb036f90..58ad4551a7c1 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -23,7 +23,7 @@
23#include <linux/blkdev.h> 23#include <linux/blkdev.h>
24#include <linux/buffer_head.h> 24#include <linux/buffer_head.h>
25#include <linux/vfs.h> 25#include <linux/vfs.h>
26#include <linux/namespace.h> 26#include <linux/mnt_namespace.h>
27#include <linux/mount.h> 27#include <linux/mount.h>
28#include <linux/namei.h> 28#include <linux/namei.h>
29#include <linux/quotaops.h> 29#include <linux/quotaops.h>