mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[NTOS/CC] Fix calls to CcRosEnsureVacbResident
The function returns BOOLEAN, not NTSTATUS! Also wrap it in SEH, because it can throw an exception on failure.
This commit is contained in:
parent
178285c275
commit
b2fcd27aaa
1 changed files with 24 additions and 5 deletions
|
@ -139,6 +139,7 @@ CcPerformReadAhead(
|
|||
ULONG Length;
|
||||
PPRIVATE_CACHE_MAP PrivateCacheMap;
|
||||
BOOLEAN Locked;
|
||||
BOOLEAN Success;
|
||||
|
||||
SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap;
|
||||
|
||||
|
@ -206,9 +207,18 @@ CcPerformReadAhead(
|
|||
goto Clear;
|
||||
}
|
||||
|
||||
Status = CcRosEnsureVacbResident(Vacb, TRUE, FALSE,
|
||||
CurrentOffset % VACB_MAPPING_GRANULARITY, PartialLength);
|
||||
if (!NT_SUCCESS(Status))
|
||||
_SEH2_TRY
|
||||
{
|
||||
Success = CcRosEnsureVacbResident(Vacb, TRUE, FALSE,
|
||||
CurrentOffset % VACB_MAPPING_GRANULARITY, PartialLength);
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
Success = FALSE;
|
||||
}
|
||||
_SEH2_END
|
||||
|
||||
if (!Success)
|
||||
{
|
||||
CcRosReleaseVacb(SharedCacheMap, Vacb, FALSE, FALSE);
|
||||
DPRINT1("Failed to read data: %lx!\n", Status);
|
||||
|
@ -234,8 +244,17 @@ CcPerformReadAhead(
|
|||
goto Clear;
|
||||
}
|
||||
|
||||
Status = CcRosEnsureVacbResident(Vacb, TRUE, FALSE, 0, PartialLength);
|
||||
if (!NT_SUCCESS(Status))
|
||||
_SEH2_TRY
|
||||
{
|
||||
Success = CcRosEnsureVacbResident(Vacb, TRUE, FALSE, 0, PartialLength);
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
Success = FALSE;
|
||||
}
|
||||
_SEH2_END
|
||||
|
||||
if (!Success)
|
||||
{
|
||||
CcRosReleaseVacb(SharedCacheMap, Vacb, FALSE, FALSE);
|
||||
DPRINT1("Failed to read data: %lx!\n", Status);
|
||||
|
|
Loading…
Reference in a new issue