mirror of
https://github.com/reactos/reactos.git
synced 2025-07-28 03:52:17 +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,9 +416,9 @@ CcPinRead (
|
|||
|
||||
/* Insert ourselves in the linked list */
|
||||
InsertTailList(&SharedCacheMap->BcbList, &iBcb->BcbEntry);
|
||||
}
|
||||
KeReleaseSpinLock(&SharedCacheMap->BcbSpinLock, OldIrql);
|
||||
}
|
||||
}
|
||||
/* We found a BCB, lock it and return it */
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue