mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[NTOS:CC] Do not access VACB after decrementing it's reference count
It might already be deleted by a different thread.
This commit is contained in:
parent
a2a063a282
commit
bf95b7e8e5
1 changed files with 6 additions and 3 deletions
|
@ -75,13 +75,16 @@ ULONG CcRosVacbIncRefCount_(PROS_VACB vacb, PCSTR file, INT line)
|
||||||
ULONG CcRosVacbDecRefCount_(PROS_VACB vacb, PCSTR file, INT line)
|
ULONG CcRosVacbDecRefCount_(PROS_VACB vacb, PCSTR file, INT line)
|
||||||
{
|
{
|
||||||
ULONG Refs;
|
ULONG Refs;
|
||||||
|
BOOLEAN VacbDirty = vacb->Dirty;
|
||||||
|
BOOLEAN VacbTrace = vacb->SharedCacheMap->Trace;
|
||||||
|
BOOLEAN VacbPageOut = vacb->PageOut;
|
||||||
|
|
||||||
Refs = InterlockedDecrement((PLONG)&vacb->ReferenceCount);
|
Refs = InterlockedDecrement((PLONG)&vacb->ReferenceCount);
|
||||||
ASSERT(!(Refs == 0 && vacb->Dirty));
|
ASSERT(!(Refs == 0 && VacbDirty));
|
||||||
if (vacb->SharedCacheMap->Trace)
|
if (VacbTrace)
|
||||||
{
|
{
|
||||||
DbgPrint("(%s:%i) VACB %p --RefCount=%lu, Dirty %u, PageOut %lu\n",
|
DbgPrint("(%s:%i) VACB %p --RefCount=%lu, Dirty %u, PageOut %lu\n",
|
||||||
file, line, vacb, Refs, vacb->Dirty, vacb->PageOut);
|
file, line, vacb, Refs, VacbDirty, VacbPageOut);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Refs == 0)
|
if (Refs == 0)
|
||||||
|
|
Loading…
Reference in a new issue