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 <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
Jeffrey Altman 2010-05-02 14:03:23 -04:00 committed by Jeffrey Altman
parent 3a48bf73d3
commit 1ff924e722

View File

@ -1078,8 +1078,7 @@ long cm_FreelanceAddMount(char *filename, char *cellname, char *volume, int rw,
} }
/* Do this while we are holding the lock */ /* Do this while we are holding the lock */
cm_data.fakeDirVersion++; cm_noteLocalMountPointChange(TRUE);
cm_localMountPointChangeFlag = 1;
lock_ReleaseMutex(&cm_Freelance_Lock); lock_ReleaseMutex(&cm_Freelance_Lock);
if (fidp) { if (fidp) {
@ -1207,8 +1206,7 @@ long cm_FreelanceRemoveMount(char *toremove)
if (found) { if (found) {
/* Do this while we are holding the lock */ /* Do this while we are holding the lock */
cm_data.fakeDirVersion++; cm_noteLocalMountPointChange(TRUE);
cm_localMountPointChangeFlag = 1;
} }
lock_ReleaseMutex(&cm_Freelance_Lock); lock_ReleaseMutex(&cm_Freelance_Lock);
return (found ? 0 : CM_ERROR_NOSUCHFILE); 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 */ /* Do this while we are holding the lock */
cm_data.fakeDirVersion++; cm_noteLocalMountPointChange(TRUE);
cm_localMountPointChangeFlag = 1;
lock_ReleaseMutex(&cm_Freelance_Lock); lock_ReleaseMutex(&cm_Freelance_Lock);
if (fidp) { if (fidp) {
@ -1390,8 +1387,7 @@ long cm_FreelanceRemoveSymlink(char *toremove)
if (found) { if (found) {
/* Do this while we are holding the lock */ /* Do this while we are holding the lock */
cm_data.fakeDirVersion++; cm_noteLocalMountPointChange(TRUE);
cm_localMountPointChangeFlag = 1;
} }
lock_ReleaseMutex(&cm_Freelance_Lock); lock_ReleaseMutex(&cm_Freelance_Lock);
return (found ? 0 : CM_ERROR_NOSUCHFILE); return (found ? 0 : CM_ERROR_NOSUCHFILE);