From 1ff924e7229451e4f789bb83a301d23d75761eaf Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sun, 2 May 2010 14:03:23 -0400 Subject: [PATCH] Windows: use cm_noteLocalMountPointChange whenever fakeDirVersion is changed cm_noteLocalMountPointChange() is meant to be used when fakeDirVersion is changed. It previously wasn't used because cm_noteLocalMountPointChange() would obtain the cm_Freelance_Lock. Now that cm_noteLocalMountPointChange() can be called while holding the lock, use it everywhere. LICENSE MIT Change-Id: I737f4572773a93a656ca0f58e07a55d250c368a1 Reviewed-on: http://gerrit.openafs.org/1888 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/WINNT/afsd/cm_freelance.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/WINNT/afsd/cm_freelance.c b/src/WINNT/afsd/cm_freelance.c index 7b3fac360f..f684496174 100644 --- a/src/WINNT/afsd/cm_freelance.c +++ b/src/WINNT/afsd/cm_freelance.c @@ -1078,8 +1078,7 @@ long cm_FreelanceAddMount(char *filename, char *cellname, char *volume, int rw, } /* Do this while we are holding the lock */ - cm_data.fakeDirVersion++; - cm_localMountPointChangeFlag = 1; + cm_noteLocalMountPointChange(TRUE); lock_ReleaseMutex(&cm_Freelance_Lock); if (fidp) { @@ -1207,8 +1206,7 @@ long cm_FreelanceRemoveMount(char *toremove) if (found) { /* Do this while we are holding the lock */ - cm_data.fakeDirVersion++; - cm_localMountPointChangeFlag = 1; + cm_noteLocalMountPointChange(TRUE); } lock_ReleaseMutex(&cm_Freelance_Lock); return (found ? 0 : CM_ERROR_NOSUCHFILE); @@ -1307,8 +1305,7 @@ long cm_FreelanceAddSymlink(char *filename, char *destination, cm_fid_t *fidp) } /* Do this while we are holding the lock */ - cm_data.fakeDirVersion++; - cm_localMountPointChangeFlag = 1; + cm_noteLocalMountPointChange(TRUE); lock_ReleaseMutex(&cm_Freelance_Lock); if (fidp) { @@ -1390,8 +1387,7 @@ long cm_FreelanceRemoveSymlink(char *toremove) if (found) { /* Do this while we are holding the lock */ - cm_data.fakeDirVersion++; - cm_localMountPointChangeFlag = 1; + cm_noteLocalMountPointChange(TRUE); } lock_ReleaseMutex(&cm_Freelance_Lock); return (found ? 0 : CM_ERROR_NOSUCHFILE);