diff options
Diffstat (limited to 'sys/fs/nullfs/null_vfsops.c')
-rw-r--r-- | sys/fs/nullfs/null_vfsops.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index e2aeeba..339b7c1 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1992, 1993 + * Copyright (c) 1992, 1993, 1995 * The Regents of the University of California. All rights reserved. * * This code is derived from software donated to Berkeley by @@ -46,7 +46,7 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/kernel.h> +#include <sys/proc.h> #include <sys/time.h> #include <sys/types.h> #include <sys/vnode.h> @@ -55,7 +55,7 @@ #include <sys/malloc.h> #include <miscfs/nullfs/null.h> -extern int nullfs_init __P((void)); +extern int nullfs_init __P((struct vfsconf *)); static int nullfs_fhtovp __P((struct mount *mp, struct fid *fidp, struct mbuf *nam, struct vnode **vpp, @@ -146,7 +146,7 @@ nullfs_mount(mp, path, data, ndp, p) /* * Unlock the node (either the lower or the alias) */ - VOP_UNLOCK(vp); + VOP_UNLOCK(vp, 0, p); /* * Make sure the node alias worked */ @@ -166,7 +166,7 @@ nullfs_mount(mp, path, data, ndp, p) if (NULLVPTOLOWERVP(nullm_rootvp)->v_mount->mnt_flag & MNT_LOCAL) mp->mnt_flag |= MNT_LOCAL; mp->mnt_data = (qaddr_t) xmp; - getnewfsid(mp, MOUNT_LOFS); + vfs_getnewfsid(mp); (void) copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size); bzero(mp->mnt_stat.f_mntonname + size, MNAMELEN - size); @@ -212,12 +212,8 @@ nullfs_unmount(mp, mntflags, p) printf("nullfs_unmount(mp = %x)\n", mp); #endif - if (mntflags & MNT_FORCE) { - /* lofs can never be rootfs so don't check for it */ - if (!doforce) - return (EINVAL); + if (mntflags & MNT_FORCE) flags |= FORCECLOSE; - } /* * Clear out buffer cache. I don't think we @@ -259,6 +255,7 @@ nullfs_root(mp, vpp) struct mount *mp; struct vnode **vpp; { + struct proc *p = curproc; /* XXX */ struct vnode *vp; #ifdef NULLFS_DIAGNOSTIC @@ -273,7 +270,7 @@ nullfs_root(mp, vpp) */ vp = MOUNTTONULLMOUNT(mp)->nullm_rootvp; VREF(vp); - VOP_LOCK(vp); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); *vpp = vp; return 0; } |