/* 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;
}
/*
* 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)
{
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