From: Miklos Szeredi <miklos@szeredi.hu>

This patch sets ->mnt_namespace where it's actually added to the
namespace.

Previously mnt_namespace was set in do_kern_mount() even if the filesystem
was never added to any process's namespace (most kernel-internal
filesystems).

This discrepancy doesn't actually cause any problems, but it's cleaner if
mnt_namespace is NULL for these non exported filesystems.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 fs/namespace.c |    1 +
 fs/super.c     |    1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff -puN fs/namespace.c~set-mnt_namespace-in-the-correct-place fs/namespace.c
--- 25/fs/namespace.c~set-mnt_namespace-in-the-correct-place	2005-06-18 02:49:17.000000000 -0700
+++ 25-akpm/fs/namespace.c	2005-06-18 02:49:17.000000000 -0700
@@ -808,6 +808,7 @@ int do_add_mount(struct vfsmount *newmnt
 		goto unlock;
 
 	newmnt->mnt_flags = mnt_flags;
+	newmnt->mnt_namespace = current->namespace;
 	err = graft_tree(newmnt, nd);
 
 	if (err == 0 && fslist) {
diff -puN fs/super.c~set-mnt_namespace-in-the-correct-place fs/super.c
--- 25/fs/super.c~set-mnt_namespace-in-the-correct-place	2005-06-18 02:49:17.000000000 -0700
+++ 25-akpm/fs/super.c	2005-06-18 02:49:17.000000000 -0700
@@ -842,7 +842,6 @@ do_kern_mount(const char *fstype, int fl
 	mnt->mnt_root = dget(sb->s_root);
 	mnt->mnt_mountpoint = sb->s_root;
 	mnt->mnt_parent = mnt;
-	mnt->mnt_namespace = current->namespace;
 	up_write(&sb->s_umount);
 	free_secdata(secdata);
 	put_filesystem(type);
_