mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 13:38:01 +00:00
DEVEL15-windows-scache-ref-leak-20061007
return the cm_scache_t whose refCount was increased (cherry picked from commit feb5f27c754325dcc5fd9eb13f305bc1c0172977)
This commit is contained in:
parent
c451a02881
commit
7486e2f4c2
@ -767,15 +767,15 @@ cm_scache_t * cm_FindSCacheParent(cm_scache_t * scp)
|
|||||||
parent_fid.unique = scp->parentUnique;
|
parent_fid.unique = scp->parentUnique;
|
||||||
|
|
||||||
if (cm_FidCmp(&scp->fid, &parent_fid)) {
|
if (cm_FidCmp(&scp->fid, &parent_fid)) {
|
||||||
for (i=0; i<cm_data.hashTableSize; i++) {
|
i = CM_SCACHE_HASH(&parent_fid);
|
||||||
for (pscp = cm_data.hashTablep[i]; pscp; pscp = pscp->nextp) {
|
for (pscp = cm_data.hashTablep[i]; pscp; pscp = pscp->nextp) {
|
||||||
if (!cm_FidCmp(&pscp->fid, &parent_fid)) {
|
if (!cm_FidCmp(&pscp->fid, &parent_fid)) {
|
||||||
cm_HoldSCacheNoLock(pscp);
|
cm_HoldSCacheNoLock(pscp);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lock_ReleaseRead(&cm_scacheLock);
|
lock_ReleaseRead(&cm_scacheLock);
|
||||||
|
|
||||||
return pscp;
|
return pscp;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user