--- Net2/ufs/ufs_vnops.c 2018/04/24 18:04:01 1.1 +++ Net2/ufs/ufs_vnops.c 2018/04/24 18:12:56 1.1.1.2 @@ -31,6 +31,15 @@ * SUCH DAMAGE. * * @(#)ufs_vnops.c 7.64 (Berkeley) 5/16/91 + * + * PATCHES MAGIC LEVEL PATCH THAT GOT US HERE + * -------------------- ----- ---------------------- + * CURRENT PATCH LEVEL: 2 00026 + * -------------------- ----- ---------------------- + * + * 27 Nov 92 Bruce Evans Fixed access() + * 20 Aug 92 David Greenman Fixed incorrect setting of B_AGE after + * each read to improve cache performance */ #include "param.h" @@ -193,7 +202,7 @@ ufs_access(vp, mode, cred, p) found: ; } - if ((ip->i_mode & mode) != 0) + if ((ip->i_mode & mode) == mode) return (0); return (EACCES); } @@ -497,8 +506,10 @@ ufs_read(vp, uio, ioflag, cred) return (error); } error = uiomove(bp->b_un.b_addr + on, (int)n, uio); +#if OMIT /* 20 Aug 92*/ if (n + on == fs->fs_bsize || uio->uio_offset == ip->i_size) bp->b_flags |= B_AGE; +#endif /* OMIT*/ brelse(bp); } while (error == 0 && uio->uio_resid > 0 && n != 0); return (error);