mirror of
https://github.com/reactos/reactos.git
synced 2024-08-08 04:08:29 +00:00
Release the BcbLock before there is a call to CcRosFreeCacheSegment (in CcSetFileSizes).
svn path=/trunk/; revision=3597
This commit is contained in:
parent
8aca0dc370
commit
68d5450c51
|
@ -89,15 +89,18 @@ CcSetFileSizes (IN PFILE_OBJECT FileObject,
|
|||
{
|
||||
current_entry = Bcb->BcbSegmentListHead.Flink;
|
||||
while (current_entry != &Bcb->BcbSegmentListHead)
|
||||
{
|
||||
current = CONTAINING_RECORD(current_entry, CACHE_SEGMENT,
|
||||
BcbSegmentListEntry);
|
||||
current_entry = current_entry->Flink;
|
||||
if (current->FileOffset > FileSizes->AllocationSize.QuadPart)
|
||||
{
|
||||
CcRosFreeCacheSegment(Bcb, current);
|
||||
}
|
||||
}
|
||||
{
|
||||
current = CONTAINING_RECORD(current_entry, CACHE_SEGMENT,
|
||||
BcbSegmentListEntry);
|
||||
current_entry = current_entry->Flink;
|
||||
if (current->FileOffset > FileSizes->AllocationSize.QuadPart)
|
||||
{
|
||||
KeReleaseSpinLock(&Bcb->BcbLock, oldirql);
|
||||
CcRosFreeCacheSegment(Bcb, current);
|
||||
KeAcquireSpinLock(&Bcb->BcbLock, &oldirql);
|
||||
current_entry = Bcb->BcbSegmentListHead.Flink;
|
||||
}
|
||||
}
|
||||
}
|
||||
Bcb->AllocationSize = FileSizes->AllocationSize;
|
||||
Bcb->FileSize = FileSizes->FileSize;
|
||||
|
|
Loading…
Reference in a new issue