diff --git a/src/WINNT/afsd/cm_freelance.c b/src/WINNT/afsd/cm_freelance.c index 336cb5e147..7b3fac360f 100644 --- a/src/WINNT/afsd/cm_freelance.c +++ b/src/WINNT/afsd/cm_freelance.c @@ -75,7 +75,7 @@ void cm_FreelanceChangeNotifier(void * parmp) { hFreelanceChangeEvent = 0; return; } - cm_noteLocalMountPointChange(); + cm_noteLocalMountPointChange(FALSE); } } } @@ -120,7 +120,7 @@ void cm_FreelanceSymlinkChangeNotifier(void * parmp) { hFreelanceSymlinkChangeEvent = 0; return; } - cm_noteLocalMountPointChange(); + cm_noteLocalMountPointChange(FALSE); } } } @@ -358,11 +358,13 @@ int cm_FakeRootFid(cm_fid_t *fidp) /* called directly from ioctl */ /* called while not holding freelance lock */ -int cm_noteLocalMountPointChange(void) { - lock_ObtainMutex(&cm_Freelance_Lock); +int cm_noteLocalMountPointChange(afs_int32 locked) { + if (!locked) + lock_ObtainMutex(&cm_Freelance_Lock); cm_data.fakeDirVersion++; cm_localMountPointChangeFlag = 1; - lock_ReleaseMutex(&cm_Freelance_Lock); + if (!locked) + lock_ReleaseMutex(&cm_Freelance_Lock); return 1; } diff --git a/src/WINNT/afsd/cm_freelance.h b/src/WINNT/afsd/cm_freelance.h index 3b01684087..9a98064114 100644 --- a/src/WINNT/afsd/cm_freelance.h +++ b/src/WINNT/afsd/cm_freelance.h @@ -14,7 +14,7 @@ extern int cm_getLocalMountPointChange(); extern int cm_reInitLocalMountPoints(); extern void cm_InitFreelance(); extern void cm_FreelanceShutdown(void); -extern int cm_noteLocalMountPointChange(void); +extern int cm_noteLocalMountPointChange(afs_int32 locked); extern long cm_FreelanceRemoveMount(char *toremove); extern long cm_FreelanceAddMount(char *filename, char *cellname, char *volume, int rw, cm_fid_t *fidp); extern long cm_FreelanceRemoveSymlink(char *toremove); diff --git a/src/WINNT/afsd/cm_ioctl.c b/src/WINNT/afsd/cm_ioctl.c index 7e3fb98d88..977d3d6f1b 100644 --- a/src/WINNT/afsd/cm_ioctl.c +++ b/src/WINNT/afsd/cm_ioctl.c @@ -95,7 +95,7 @@ cm_FlushFile(cm_scache_t *scp, cm_user_t *userp, cm_req_t *reqp) #ifdef AFS_FREELANCE_CLIENT if ( scp->fid.cell == AFS_FAKE_ROOT_CELL_ID && scp->fid.volume == AFS_FAKE_ROOT_VOL_ID ) { - cm_noteLocalMountPointChange(); + cm_noteLocalMountPointChange(FALSE); return 0; } #endif @@ -148,7 +148,7 @@ cm_FlushVolume(cm_user_t *userp, cm_req_t *reqp, afs_uint32 cell, afs_uint32 vol #ifdef AFS_FREELANCE_CLIENT if ( cell == AFS_FAKE_ROOT_CELL_ID && volume == AFS_FAKE_ROOT_VOL_ID ) { - cm_noteLocalMountPointChange(); + cm_noteLocalMountPointChange(FALSE); return 0; } #endif diff --git a/src/WINNT/afsd/smb.c b/src/WINNT/afsd/smb.c index 8a86680365..4130752bca 100644 --- a/src/WINNT/afsd/smb.c +++ b/src/WINNT/afsd/smb.c @@ -4075,7 +4075,7 @@ void smb_Daemon(void *parmp) #ifdef AFS_FREELANCE if ( smb_localZero != old_localZero ) - cm_noteLocalMountPointChange(); + cm_noteLocalMountPointChange(FALSE); #endif smb_CheckVCs(); @@ -10661,7 +10661,7 @@ void smb_Init(osi_log_t *logp, int useV3, #ifdef AFS_FREELANCE_CLIENT /* Make sure the root.afs volume has the correct time */ - cm_noteLocalMountPointChange(); + cm_noteLocalMountPointChange(FALSE); #endif /* initialize the remote debugging log */