From: dm Date: Mon, 8 Jan 1996 07:36:23 +0000 (+0000) Subject: graichen@freebsd.org: fixed -type:=direct mounts in amd X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b5030eeda6b45f9e3e648981fe812f891a9a931c;p=openbsd graichen@freebsd.org: fixed -type:=direct mounts in amd --- diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c index fd4d2b7fad9..0476a70083d 100644 --- a/sys/nfs/nfs_bio.c +++ b/sys/nfs/nfs_bio.c @@ -167,7 +167,11 @@ nfs_bioread(vp, uio, ioflag, cred) return (error); } } - if (np->n_flag & NQNFSNONCACHE) { + /* + * Don't cache magic amd symlinks. + */ + if (np->n_flag & NQNFSNONCACHE + || ((vp->v_flag & VROOT) && vp->v_type == VLNK)) { switch (vp->v_type) { case VREG: error = nfs_readrpc(vp, uio, cred); diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c index ad2ec190bb3..1322229fe51 100644 --- a/sys/nfs/nfs_subs.c +++ b/sys/nfs/nfs_subs.c @@ -698,7 +698,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper) * information. */ np = VTONFS(vp); - if (vp->v_type == VNON) { + if (vp->v_type != vtyp) { if (vtyp == VCHR && rdev == 0xffffffff) vp->v_type = vtyp = VFIFO; else diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c index db33639afe6..d876fbd22fb 100644 --- a/sys/nfs/nfs_vfsops.c +++ b/sys/nfs/nfs_vfsops.c @@ -486,6 +486,7 @@ mountnfs(argp, mp, nam, pth, hst, vpp) register struct nfsmount *nmp; struct nfsnode *np; int error; + struct vattr attrs; if (mp->mnt_flag & MNT_UPDATE) { nmp = VFSTONFS(mp); @@ -565,6 +566,7 @@ mountnfs(argp, mp, nam, pth, hst, vpp) if (error = nfs_nget(mp, &nmp->nm_fh, &np)) goto bad; *vpp = NFSTOV(np); + VOP_GETATTR(*vpp, &attrs, curproc->p_ucred, curproc); return (0); bad: @@ -664,7 +666,8 @@ nfs_root(mp, vpp) if (error = nfs_nget(mp, &nmp->nm_fh, &np)) return (error); vp = NFSTOV(np); - vp->v_type = VDIR; + if (vp->v_type == VNON) + vp->v_type = VDIR; vp->v_flag = VROOT; *vpp = vp; return (0); diff --git a/usr.sbin/amd/config/os-bsd44.h b/usr.sbin/amd/config/os-bsd44.h index 4fe2ba8637f..128dafeeff6 100644 --- a/usr.sbin/amd/config/os-bsd44.h +++ b/usr.sbin/amd/config/os-bsd44.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)os-bsd44.h 8.1 (Berkeley) 6/6/93 - * $Id: os-bsd44.h,v 1.1.1.1 1995/10/18 08:47:14 deraadt Exp $ + * $Id: os-bsd44.h,v 1.2 1996/01/08 07:36:31 dm Exp $ * * 4.4 BSD definitions for Amd (automounter) */ @@ -196,3 +196,8 @@ struct mntent { */ #undef RE_HDR #define RE_HDR + +/* + * Need precise length links + */ +#define PRECISE_SYMLINKS