From: Jeffrey Altman Date: Fri, 11 Apr 2008 18:46:24 +0000 (+0000) Subject: DEVEL15-windows-freelance-20080411 X-Git-Tag: openafs-devel-1_5_35~17 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=81dfd4660553b5d0ebe07e3367bdc66c2c5e7afe;p=packages%2Fo%2Fopenafs.git DEVEL15-windows-freelance-20080411 LICENSE MIT Do not set the DV on the rootSCachep because doing so disables the use of MergeStatus(). Do not remove the rootSCachep from the hash table because doing so makes causes a second cm_scache_t object for that fid to be created that is not the root. (cherry picked from commit 7bfe889eb2e900719c70cd9fd29f82569ef4c04c) --- diff --git a/src/WINNT/afsd/cm_callback.c b/src/WINNT/afsd/cm_callback.c index b2aaf7e15..f1489f908 100644 --- a/src/WINNT/afsd/cm_callback.c +++ b/src/WINNT/afsd/cm_callback.c @@ -1466,12 +1466,6 @@ int cm_HaveCallback(cm_scache_t *scp) if (cm_freelanceEnabled && scp->fid.cell==AFS_FAKE_ROOT_CELL_ID && scp->fid.volume==AFS_FAKE_ROOT_VOL_ID) { - /* if it's something on /afs */ - if (!(scp->fid.vnode==0x1 && scp->fid.unique==0x1)) { - /* if it's not root.afs */ - return 1; - } - lock_ObtainMutex(&cm_Freelance_Lock); fdc = cm_fakeDirCallback; fgc = cm_fakeGettingCallback; diff --git a/src/WINNT/afsd/cm_freelance.c b/src/WINNT/afsd/cm_freelance.c index efcaa57a3..a83a6e239 100644 --- a/src/WINNT/afsd/cm_freelance.c +++ b/src/WINNT/afsd/cm_freelance.c @@ -153,10 +153,6 @@ void cm_InitFreelance() { lock_InitializeMutex(&cm_Freelance_Lock, "Freelance Lock"); - // make sure we sync the data version to the cached root scache_t - if (cm_data.rootSCachep && cm_data.rootSCachep->fid.cell == AFS_FAKE_ROOT_CELL_ID) - cm_data.fakeDirVersion = cm_data.rootSCachep->dataVersion; - // yj: first we make a call to cm_initLocalMountPoints // to read all the local mount points from the registry cm_InitLocalMountPoints(); @@ -406,7 +402,7 @@ int cm_reInitLocalMountPoints() { for (i=0; inextp) { - if (cm_FidCmp(&scp->fid, &aFid) == 0) { + if (scp != cm_data.rootSCachep && cm_FidCmp(&scp->fid, &aFid) == 0) { // mark the scp to be reused cm_HoldSCacheNoLock(scp); lock_ReleaseWrite(&cm_scacheLock);