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: upstream/1.6.3^2~46 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=3336b6b5ef04773ce0cbe7c91acb48373581483e;p=packages%2Fo%2Fopenafs.git 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. Reviewed-on: http://gerrit.openafs.org/7431 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 35d5be2adf2456e26aa6b10935352dc19eb6b3f2) Change-Id: I32f859c4478432de65025f35ae0c484ff7fa1bf0 Reviewed-on: http://gerrit.openafs.org/9494 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand --- diff --git a/src/afs/VNOPS/afs_vnop_lookup.c b/src/afs/VNOPS/afs_vnop_lookup.c index d076a0d35..5d96f75c1 100644 --- a/src/afs/VNOPS/afs_vnop_lookup.c +++ b/src/afs/VNOPS/afs_vnop_lookup.c @@ -1930,7 +1930,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