mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 23:40:13 +00:00
Windows: add assertions to cm_scache.c
Change-Id: If9a47c3b1507b5b4aa9c271204ff496c5b0a88a0 Reviewed-on: http://gerrit.openafs.org/5280 Reviewed-by: Jeffrey Altman <jaltman@openafs.org> Tested-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
parent
c58ae34f72
commit
1a0b99e654
@ -139,6 +139,9 @@ void cm_ResetSCacheDirectory(cm_scache_t *scp, afs_int32 dirlock)
|
||||
/* called with cm_scacheLock and scp write-locked; recycles an existing scp. */
|
||||
long cm_RecycleSCache(cm_scache_t *scp, afs_int32 flags)
|
||||
{
|
||||
lock_AssertWrite(&cm_scacheLock);
|
||||
lock_AssertWrite(&scp->rw);
|
||||
|
||||
if (scp->refCount != 0) {
|
||||
return -1;
|
||||
}
|
||||
@ -276,7 +279,7 @@ long cm_RecycleSCache(cm_scache_t *scp, afs_int32 flags)
|
||||
/*
|
||||
* called with cm_scacheLock write-locked; find a vnode to recycle.
|
||||
* Can allocate a new one if desperate, or if below quota (cm_data.maxSCaches).
|
||||
* returns scp->mx held.
|
||||
* returns scp->rw write-locked.
|
||||
*/
|
||||
cm_scache_t *cm_GetNewSCache(void)
|
||||
{
|
||||
@ -1530,6 +1533,8 @@ void cm_MergeStatus(cm_scache_t *dscp,
|
||||
struct cm_volume *volp = NULL;
|
||||
struct cm_cell *cellp = NULL;
|
||||
|
||||
lock_AssertWrite(&scp->rw);
|
||||
|
||||
// yj: i want to create some fake status for the /afs directory and the
|
||||
// entries under that directory
|
||||
#ifdef AFS_FREELANCE_CLIENT
|
||||
|
Loading…
Reference in New Issue
Block a user