diff --git a/src/afs/VNOPS/afs_vnop_access.c b/src/afs/VNOPS/afs_vnop_access.c index a5cd799145..7e2cd7325b 100644 --- a/src/afs/VNOPS/afs_vnop_access.c +++ b/src/afs/VNOPS/afs_vnop_access.c @@ -224,11 +224,13 @@ afs_access(OSI_VC_DECL(avc), register afs_int32 amode, return code; } - code = afs_VerifyVCache(avc, &treq); - if (code) { - afs_PutFakeStat(&fakestate); - code = afs_CheckCode(code, &treq, 16); - return code; + if (vType(avc) != VDIR || !afs_InReadDir(avc)) { + code = afs_VerifyVCache(avc, &treq); + if (code) { + afs_PutFakeStat(&fakestate); + code = afs_CheckCode(code, &treq, 16); + return code; + } } /* if we're looking for write access and we have a read-only file system, report it */