From: Jeffrey Altman Date: Sat, 18 Oct 2008 05:44:51 +0000 (+0000) Subject: windows-reset-acl-list-20081017 X-Git-Tag: openafs-devel-1_5_61~749 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=edf7a4020318b305ce8fd3852f09f2f565563f7c;p=packages%2Fo%2Fopenafs.git windows-reset-acl-list-20081017 LICENSE MIT Move definition of cm_ResetACLCache from cm_ioctl.c to cm_aclent.c --- diff --git a/src/WINNT/afsd/cm_aclent.c b/src/WINNT/afsd/cm_aclent.c index c2138ede5..9182b9ae6 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 111693049..27e0ec30e 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 f9d926640..1d78f0c67 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 1a327ebbb..66c7cc2e7 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);