summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>1998-07-13 05:43:11 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>1998-07-13 05:43:11 +0000
commit13777a42ddb99a0be9adee66145114b2a99bd490 (patch)
treef1d6c9aeabe8aa241ad5d5ef49d7f18e2fa58669 /sys
parent5d238d65af219cab7cb4142806117c43382a430e (diff)
Part 1) of a fix to the "mount /mnt /mnt" problem.
Don't mount the file system in the kernel name space before calling VFS_MOUNT.
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/vfs_syscalls.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index d3b9d8f938e..5efcddd5b88 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls.c,v 1.42 1998/07/13 02:11:30 millert Exp $ */
+/* $OpenBSD: vfs_syscalls.c,v 1.43 1998/07/13 05:43:10 csapuntz Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */
/*
@@ -251,7 +251,6 @@ sys_mount(p, v, retval)
mp->mnt_stat.f_type = vfsp->vfc_typenum;
mp->mnt_flag |= (vfsp->vfc_flags & MNT_VISFLAGMASK);
strncpy(mp->mnt_stat.f_fstypename, vfsp->vfc_name, MFSNAMELEN);
- vp->v_mountedhere = mp;
mp->mnt_vnodecovered = vp;
mp->mnt_stat.f_owner = p->p_ucred->cr_uid;
update:
@@ -291,6 +290,9 @@ update:
vfs_unbusy(mp, p);
return (error);
}
+
+ vp->v_mountedhere = mp;
+
/*
* Put the new filesystem on the mount list after root.
*/