From: Andrew Deason Date: Fri, 18 May 2012 21:55:09 +0000 (-0400) Subject: afs: Do not avoid DNLC if fakestat is set X-Git-Tag: openafs-stable-1_8_0pre1~2043 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=35d5be2adf2456e26aa6b10935352dc19eb6b3f2 afs: Do not avoid DNLC if fakestat is set Currently in afs_lookup we avoid putting an entry in the DNLC if 'force_eval' is unset, in order to avoid populating the DNLC with mountpoint symlinks (we want the target of the mountpoint to be in there instead, the root dir). However, if -fakestat or -fakestat-all are enabled, 'force_eval' is always false, since we only set it to true under certain circumstances when evaluating mountpoints. To fix this, populate the dnlc for non-mountpoints, even if force_eval is unset. Change-Id: Ia2fef1bea9a08182715d587517f81074147aa4e7 Reviewed-on: http://gerrit.openafs.org/7431 Reviewed-by: Derrick Brashear Tested-by: BuildBot --- diff --git a/src/afs/VNOPS/afs_vnop_lookup.c b/src/afs/VNOPS/afs_vnop_lookup.c index 5bddf76..1a36056 100644 --- a/src/afs/VNOPS/afs_vnop_lookup.c +++ b/src/afs/VNOPS/afs_vnop_lookup.c @@ -1928,7 +1928,7 @@ afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, afs_ucred_t *acr * volume) rather than the vc of the mount point itself. We can * still find the mount point's vc in the vcache by its fid. */ #endif /* UKERNEL */ - if (!hit && force_eval) { + if (!hit && (force_eval || tvc->mvstat != 1)) { osi_dnlc_enter(adp, aname, tvc, &versionNo); } else { #ifdef AFS_LINUX20_ENV