From: pedro Date: Mon, 25 Aug 2008 09:26:17 +0000 (+0000) Subject: Correctly invalidate attribute cache entries in case the vnode mode X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=bab31ab25ee3d7661972ef5405a4ae5feff172a0;p=openbsd Correctly invalidate attribute cache entries in case the vnode mode changes, okay beck@, tedu@ and thib@. --- diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c index ed02854851b..09678d56569 100644 --- a/sys/nfs/nfs_subs.c +++ b/sys/nfs/nfs_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_subs.c,v 1.85 2008/08/08 20:44:38 blambert Exp $ */ +/* $OpenBSD: nfs_subs.c,v 1.86 2008/08/25 09:26:17 pedro Exp $ */ /* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */ /* @@ -1069,7 +1069,6 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper) } vap = &np->n_vattr; vap->va_type = vtyp; - vap->va_mode = (vmode & 07777); vap->va_rdev = (dev_t)rdev; vap->va_mtime = mtime; vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0]; @@ -1079,9 +1078,11 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper) /* Invalidate access cache if uid, gid or mode changed. */ if (np->n_accstamp != -1 && (gid != vap->va_gid || uid != vap->va_uid || - vmode != vap->va_mode)) + (vmode & 07777) != vap->va_mode)) np->n_accstamp = -1; + vap->va_mode = (vmode & 07777); + switch (vtyp) { case VBLK: vap->va_blocksize = BLKDEV_IOSIZE;