mirror of
https://github.com/reactos/reactos.git
synced 2025-05-07 02:41:22 +00:00
[NTOSKRNL] Don't keep the spin lock hold too long when we lost the BCB race
This will avoid a deadlock on unpin.
This commit is contained in:
parent
cf8ba3bd9c
commit
1acb5a9fab
1 changed files with 3 additions and 1 deletions
|
@ -385,6 +385,8 @@ CcPinRead (
|
|||
iBcb = CcpFindBcb(SharedCacheMap, FileOffset, Length, TRUE);
|
||||
if (iBcb != NULL)
|
||||
{
|
||||
KeReleaseSpinLock(&SharedCacheMap->BcbSpinLock, OldIrql);
|
||||
|
||||
/* Free our now unused BCB */
|
||||
CcUnpinData(*Bcb);
|
||||
|
||||
|
@ -414,8 +416,8 @@ CcPinRead (
|
|||
|
||||
/* Insert ourselves in the linked list */
|
||||
InsertTailList(&SharedCacheMap->BcbList, &iBcb->BcbEntry);
|
||||
KeReleaseSpinLock(&SharedCacheMap->BcbSpinLock, OldIrql);
|
||||
}
|
||||
KeReleaseSpinLock(&SharedCacheMap->BcbSpinLock, OldIrql);
|
||||
}
|
||||
/* We found a BCB, lock it and return it */
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue