summaryrefslogtreecommitdiff
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2005-07-08 04:57:28 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-08 05:23:52 +0400
commit484e389c63472a7f8cfb491cf11b047364e59365 (patch)
tree764b4430991d19f409e304cf2b96b4346e0af3bb /fs/namespace.c
parentac0811538b40bb92d339d22364026ed91dfdd147 (diff)
downloadlinux-484e389c63472a7f8cfb491cf11b047364e59365.tar.xz
[PATCH] set mnt_namespace in the correct place
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> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 7fd56eeb21bf..b168dc37eaab 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -808,6 +808,7 @@ int do_add_mount(struct vfsmount *newmnt, struct nameidata *nd,
goto unlock;
newmnt->mnt_flags = mnt_flags;
+ newmnt->mnt_namespace = current->namespace;
err = graft_tree(newmnt, nd);
if (err == 0 && fslist) {