diff --git a/src/WINNT/afsd/cm_aclent.c b/src/WINNT/afsd/cm_aclent.c index c2138ede59..9182b9ae6e 100644 --- a/src/WINNT/afsd/cm_aclent.c +++ b/src/WINNT/afsd/cm_aclent.c @@ -337,3 +337,29 @@ void cm_InvalidateACLUser(cm_scache_t *scp, cm_user_t *userp) } lock_ReleaseWrite(&cm_aclLock); } + +/* + * Invalidate ACL info for a user that has just obtained or lost tokens. + */ +void +cm_ResetACLCache(cm_user_t *userp) +{ + cm_scache_t *scp; + int hash; + + lock_ObtainWrite(&cm_scacheLock); + for (hash=0; hash < cm_data.scacheHashTableSize; hash++) { + for (scp=cm_data.scacheHashTablep[hash]; scp; scp=scp->nextp) { + cm_HoldSCacheNoLock(scp); + lock_ReleaseWrite(&cm_scacheLock); + lock_ObtainWrite(&scp->rw); + cm_InvalidateACLUser(scp, userp); + lock_ReleaseWrite(&scp->rw); + lock_ObtainWrite(&cm_scacheLock); + cm_ReleaseSCacheNoLock(scp); + } + } + lock_ReleaseWrite(&cm_scacheLock); +} + + diff --git a/src/WINNT/afsd/cm_aclent.h b/src/WINNT/afsd/cm_aclent.h index 1116930494..27e0ec30ea 100644 --- a/src/WINNT/afsd/cm_aclent.h +++ b/src/WINNT/afsd/cm_aclent.h @@ -47,4 +47,6 @@ extern long cm_ValidateACLCache(void); extern long cm_ShutdownACLCache(void); +extern void cm_ResetACLCache(cm_user_t *userp); + #endif /* _CM_ACLENT_H_ */ diff --git a/src/WINNT/afsd/cm_ioctl.c b/src/WINNT/afsd/cm_ioctl.c index f9d926640e..1d78f0c67d 100644 --- a/src/WINNT/afsd/cm_ioctl.c +++ b/src/WINNT/afsd/cm_ioctl.c @@ -168,31 +168,6 @@ cm_FlushVolume(cm_user_t *userp, cm_req_t *reqp, afs_uint32 cell, afs_uint32 vol return code; } -/* - * Utility function. Used within this file. - * Invalidate ACL info for a user that has just obtained or lost tokens. - */ -void -cm_ResetACLCache(cm_user_t *userp) -{ - cm_scache_t *scp; - int hash; - - lock_ObtainWrite(&cm_scacheLock); - for (hash=0; hash < cm_data.scacheHashTableSize; hash++) { - for (scp=cm_data.scacheHashTablep[hash]; scp; scp=scp->nextp) { - cm_HoldSCacheNoLock(scp); - lock_ReleaseWrite(&cm_scacheLock); - lock_ObtainWrite(&scp->rw); - cm_InvalidateACLUser(scp, userp); - lock_ReleaseWrite(&scp->rw); - lock_ObtainWrite(&cm_scacheLock); - cm_ReleaseSCacheNoLock(scp); - } - } - lock_ReleaseWrite(&cm_scacheLock); -} - /* * TranslateExtendedChars - This is a fix for TR 54482. * diff --git a/src/WINNT/afsd/cm_ioctl.h b/src/WINNT/afsd/cm_ioctl.h index 1a327ebbb9..66c7cc2e75 100644 --- a/src/WINNT/afsd/cm_ioctl.h +++ b/src/WINNT/afsd/cm_ioctl.h @@ -141,8 +141,6 @@ extern const int utf8_prefix_size; extern void cm_InitIoctl(void); -extern void cm_ResetACLCache(cm_user_t *userp); - extern cm_ioctlQueryOptions_t * cm_IoctlGetQueryOptions(struct cm_ioctl *ioctlp, struct cm_user *userp);