diff options
author | dm <dm@cvs.openbsd.org> | 1996-01-08 07:36:32 +0000 |
---|---|---|
committer | dm <dm@cvs.openbsd.org> | 1996-01-08 07:36:32 +0000 |
commit | 5206e2dfad8c881637d2223553b5c424c3ef2979 (patch) | |
tree | 3d1ae83f4ed663893657011782ae80bcf39e3c2f | |
parent | 02f8d2bd154374eb838e10623afe40ca37374fbf (diff) |
graichen@freebsd.org: fixed -type:=direct mounts in amd
-rw-r--r-- | sys/nfs/nfs_bio.c | 6 | ||||
-rw-r--r-- | sys/nfs/nfs_subs.c | 2 | ||||
-rw-r--r-- | sys/nfs/nfs_vfsops.c | 5 | ||||
-rw-r--r-- | usr.sbin/amd/config/os-bsd44.h | 7 |
4 files changed, 16 insertions, 4 deletions
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 1735aa9e355..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 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 <regexp.h> + +/* + * Need precise length links + */ +#define PRECISE_SYMLINKS |