From 0f4c404cbe82391b093d55039017ad43c3955261 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 5 Feb 2009 00:25:03 +0000 Subject: [PATCH] KDFS-windows-freelance-20090204 LICENSE MIT set the correct fid vnode/unique values when adding new symlnks and mount points. (cherry picked from commit ffdc7c70889386dca37e207a91791d5d0728d2d7) --- src/WINNT/afsd/cm_freelance.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/WINNT/afsd/cm_freelance.c b/src/WINNT/afsd/cm_freelance.c index 886b23cccc..5efedee720 100644 --- a/src/WINNT/afsd/cm_freelance.c +++ b/src/WINNT/afsd/cm_freelance.c @@ -385,11 +385,10 @@ int cm_reInitLocalMountPoints() { osi_Log0(afsd_logp,"Invalidating local mount point scp... "); - lock_ObtainWrite(&cm_scacheLock); lock_ObtainMutex(&cm_Freelance_Lock); /* always scache then freelance lock */ for (i=1; i<=cm_noLocalMountPoints; i++) { - cm_SetFid(&aFid, AFS_FAKE_ROOT_CELL_ID, AFS_FAKE_ROOT_VOL_ID, i, 1); + cm_SetFid(&aFid, AFS_FAKE_ROOT_CELL_ID, AFS_FAKE_ROOT_VOL_ID, i*2, i); hash = CM_SCACHE_HASH(&aFid); for (scp=cm_data.scacheHashTablep[hash]; scp; scp=scp->nextp) { if (scp != cm_data.rootSCachep && cm_FidCmp(&scp->fid, &aFid) == 0) { @@ -1073,7 +1072,7 @@ long cm_FreelanceAddMount(char *filename, char *cellname, char *volume, int rw, /* cm_reInitLocalMountPoints(); */ if (fidp) - cm_SetFid(fidp, fidp->cell, fidp->volume, ++cm_noLocalMountPoints, 1); + cm_SetFid(fidp, fidp->cell, fidp->volume, ++cm_noLocalMountPoints*2, cm_noLocalMountPoints); cm_noteLocalMountPointChange(); return 0; } @@ -1280,7 +1279,7 @@ long cm_FreelanceAddSymlink(char *filename, char *destination, cm_fid_t *fidp) /* cm_reInitLocalMountPoints(); */ if (fidp) - cm_SetFid(fidp, fidp->cell, fidp->volume, ++cm_noLocalMountPoints, 1); + cm_SetFid(fidp, fidp->cell, fidp->volume, ++cm_noLocalMountPoints*2, cm_noLocalMountPoints); cm_noteLocalMountPointChange(); return 0; }