aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 4363a4eb84e3..dd249c37b3a3 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -600,16 +600,16 @@ static struct fs_struct *__copy_fs_struct(struct fs_struct *old)
600 rwlock_init(&fs->lock); 600 rwlock_init(&fs->lock);
601 fs->umask = old->umask; 601 fs->umask = old->umask;
602 read_lock(&old->lock); 602 read_lock(&old->lock);
603 fs->rootmnt = mntget(old->rootmnt); 603 fs->root = old->root;
604 fs->root = dget(old->root); 604 path_get(&old->root);
605 fs->pwdmnt = mntget(old->pwdmnt); 605 fs->pwd = old->pwd;
606 fs->pwd = dget(old->pwd); 606 path_get(&old->pwd);
607 if (old->altroot) { 607 if (old->altroot.dentry) {
608 fs->altrootmnt = mntget(old->altrootmnt); 608 fs->altroot = old->altroot;
609 fs->altroot = dget(old->altroot); 609 path_get(&old->altroot);
610 } else { 610 } else {
611 fs->altrootmnt = NULL; 611 fs->altroot.mnt = NULL;
612 fs->altroot = NULL; 612 fs->altroot.dentry = NULL;
613 } 613 }
614 read_unlock(&old->lock); 614 read_unlock(&old->lock);
615 } 615 }