aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index f30b11e2240e..c4fcf48acef8 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1972,7 +1972,7 @@ static struct mnt_namespace *dup_mnt_ns(struct mnt_namespace *mnt_ns,
1972 struct fs_struct *fs) 1972 struct fs_struct *fs)
1973{ 1973{
1974 struct mnt_namespace *new_ns; 1974 struct mnt_namespace *new_ns;
1975 struct vfsmount *rootmnt = NULL, *pwdmnt = NULL, *altrootmnt = NULL; 1975 struct vfsmount *rootmnt = NULL, *pwdmnt = NULL;
1976 struct vfsmount *p, *q; 1976 struct vfsmount *p, *q;
1977 1977
1978 new_ns = kmalloc(sizeof(struct mnt_namespace), GFP_KERNEL); 1978 new_ns = kmalloc(sizeof(struct mnt_namespace), GFP_KERNEL);
@@ -2015,10 +2015,6 @@ static struct mnt_namespace *dup_mnt_ns(struct mnt_namespace *mnt_ns,
2015 pwdmnt = p; 2015 pwdmnt = p;
2016 fs->pwd.mnt = mntget(q); 2016 fs->pwd.mnt = mntget(q);
2017 } 2017 }
2018 if (p == fs->altroot.mnt) {
2019 altrootmnt = p;
2020 fs->altroot.mnt = mntget(q);
2021 }
2022 } 2018 }
2023 p = next_mnt(p, mnt_ns->root); 2019 p = next_mnt(p, mnt_ns->root);
2024 q = next_mnt(q, new_ns->root); 2020 q = next_mnt(q, new_ns->root);
@@ -2029,8 +2025,6 @@ static struct mnt_namespace *dup_mnt_ns(struct mnt_namespace *mnt_ns,
2029 mntput(rootmnt); 2025 mntput(rootmnt);
2030 if (pwdmnt) 2026 if (pwdmnt)
2031 mntput(pwdmnt); 2027 mntput(pwdmnt);
2032 if (altrootmnt)
2033 mntput(altrootmnt);
2034 2028
2035 return new_ns; 2029 return new_ns;
2036} 2030}