Commit efcea164 authored by Alexander Viro's avatar Alexander Viro Committed by Andy Grover

[PATCH] CLONE_NEWNS fix

Spotted by Andries - cloning namespace assumes that new tree is
congruent to the old one (when switching root/cwd) but actually
inverts the order of children in each node.
parent 022bfbc0
......@@ -110,7 +110,7 @@ static void attach_mnt(struct vfsmount *mnt, struct nameidata *nd)
mnt->mnt_parent = mntget(nd->mnt);
mnt->mnt_mountpoint = dget(nd->dentry);
list_add(&mnt->mnt_hash, mount_hashtable+hash(nd->mnt, nd->dentry));
list_add(&mnt->mnt_child, &nd->mnt->mnt_mounts);
list_add_tail(&mnt->mnt_child, &nd->mnt->mnt_mounts);
nd->dentry->d_mounted++;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment