mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
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:
parent
3a48bf73d3
commit
1ff924e722
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user