mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 23:40:13 +00:00
windows-reset-acl-list-20081017
LICENSE MIT Move definition of cm_ResetACLCache from cm_ioctl.c to cm_aclent.c
This commit is contained in:
parent
4c79498bc3
commit
edf7a40203
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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_ */
|
||||
|
@ -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.
|
||||
*
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user