mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +00:00
windows-scache-ref-leak-20061007
return the cm_scache_t whose refCount was increased
This commit is contained in:
parent
ffe26eb18d
commit
feb5f27c75
@ -765,15 +765,15 @@ cm_scache_t * cm_FindSCacheParent(cm_scache_t * scp)
|
||||
parent_fid.unique = scp->parentUnique;
|
||||
|
||||
if (cm_FidCmp(&scp->fid, &parent_fid)) {
|
||||
for (i=0; i<cm_data.hashTableSize; i++) {
|
||||
for (pscp = cm_data.hashTablep[i]; pscp; pscp = pscp->nextp) {
|
||||
if (!cm_FidCmp(&pscp->fid, &parent_fid)) {
|
||||
cm_HoldSCacheNoLock(pscp);
|
||||
break;
|
||||
}
|
||||
i = CM_SCACHE_HASH(&parent_fid);
|
||||
for (pscp = cm_data.hashTablep[i]; pscp; pscp = pscp->nextp) {
|
||||
if (!cm_FidCmp(&pscp->fid, &parent_fid)) {
|
||||
cm_HoldSCacheNoLock(pscp);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lock_ReleaseRead(&cm_scacheLock);
|
||||
|
||||
return pscp;
|
||||
|
Loading…
Reference in New Issue
Block a user