mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[NTOS:MM] MmFlushSegment: Simplify return (#7422)
This commit is contained in:
parent
0c2cdcae83
commit
259180a568
1 changed files with 5 additions and 10 deletions
|
@ -4961,9 +4961,7 @@ MmFlushSegment(
|
||||||
if (!Segment)
|
if (!Segment)
|
||||||
{
|
{
|
||||||
/* Nothing to flush */
|
/* Nothing to flush */
|
||||||
if (Iosb)
|
goto Quit;
|
||||||
Iosb->Status = STATUS_SUCCESS;
|
|
||||||
return STATUS_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT(*Segment->Flags & MM_DATAFILE_SEGMENT);
|
ASSERT(*Segment->Flags & MM_DATAFILE_SEGMENT);
|
||||||
|
@ -4976,17 +4974,12 @@ MmFlushSegment(
|
||||||
|
|
||||||
/* FIXME: All of this is suboptimal */
|
/* FIXME: All of this is suboptimal */
|
||||||
ULONG ElemCount = RtlNumberGenericTableElements(&Segment->PageTable);
|
ULONG ElemCount = RtlNumberGenericTableElements(&Segment->PageTable);
|
||||||
/* No page. Nothing to flush */
|
|
||||||
if (!ElemCount)
|
if (!ElemCount)
|
||||||
{
|
{
|
||||||
|
/* No page. Nothing to flush */
|
||||||
MmUnlockSectionSegment(Segment);
|
MmUnlockSectionSegment(Segment);
|
||||||
MmDereferenceSegment(Segment);
|
MmDereferenceSegment(Segment);
|
||||||
if (Iosb)
|
goto Quit;
|
||||||
{
|
|
||||||
Iosb->Status = STATUS_SUCCESS;
|
|
||||||
Iosb->Information = 0;
|
|
||||||
}
|
|
||||||
return STATUS_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PCACHE_SECTION_PAGE_TABLE PageTable = RtlGetElementGenericTable(&Segment->PageTable, ElemCount - 1);
|
PCACHE_SECTION_PAGE_TABLE PageTable = RtlGetElementGenericTable(&Segment->PageTable, ElemCount - 1);
|
||||||
|
@ -5014,6 +5007,8 @@ MmFlushSegment(
|
||||||
MmUnlockSectionSegment(Segment);
|
MmUnlockSectionSegment(Segment);
|
||||||
MmDereferenceSegment(Segment);
|
MmDereferenceSegment(Segment);
|
||||||
|
|
||||||
|
Quit:
|
||||||
|
/* FIXME: Handle failures */
|
||||||
if (Iosb)
|
if (Iosb)
|
||||||
Iosb->Status = STATUS_SUCCESS;
|
Iosb->Status = STATUS_SUCCESS;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue