diff options
author | Pedro Martelletto <pedro@cvs.openbsd.org> | 2008-08-25 09:26:18 +0000 |
---|---|---|
committer | Pedro Martelletto <pedro@cvs.openbsd.org> | 2008-08-25 09:26:18 +0000 |
commit | ff55e1c272f6c5915e4286b8ced9524c824e92c0 (patch) | |
tree | 504cbf1288bffdccc3fd31ab932120ad67d1b3ca | |
parent | ee73e55cdc31ad5d2e1aeae1952e22c7ccfc4b1d (diff) |
Correctly invalidate attribute cache entries in case the vnode mode
changes, okay beck@, tedu@ and thib@.
-rw-r--r-- | sys/nfs/nfs_subs.c | 7 |
1 files changed, 4 insertions, 3 deletions
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; |