diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-09-27 03:23:48 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-09-27 03:23:48 +0000 |
commit | 490f9aa935add9a23ae023463d66be1ff1c97d92 (patch) | |
tree | 700d4247e157d2dfa57940097668a92e5bde2f29 /sys/kern | |
parent | 80a3303ae694bbd5ac0e3a41797e78cb49a91fd9 (diff) |
Only update vfs_refcount when the mount succeeds and MNT_UPDATE not set.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_syscalls.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index d9b078ddabb..f14b7f97cb4 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_syscalls.c,v 1.45 1998/08/17 23:26:17 csapuntz Exp $ */ +/* $OpenBSD: vfs_syscalls.c,v 1.46 1998/09/27 03:23:47 millert Exp $ */ /* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */ /* @@ -247,7 +247,6 @@ sys_mount(p, v, retval) vfs_busy(mp, LK_NOWAIT, 0, p); mp->mnt_op = vfsp->vfc_vfsops; mp->mnt_vfc = vfsp; - vfsp->vfc_refcount++; 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); @@ -298,6 +297,7 @@ update: */ cache_purge(vp); if (!error) { + vfsp->vfc_refcount++; simple_lock(&mountlist_slock); CIRCLEQ_INSERT_TAIL(&mountlist, mp, mnt_list); simple_unlock(&mountlist_slock); |