mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 12:23:30 +00:00
[NTOSKRNL]
In FsRtlAddBaseMcbEntry(), try to detect incompatible LBNs before altering mappings. This fixes a few tests failures CORE-11002 svn path=/trunk/; revision=71145
This commit is contained in:
@@ -135,10 +135,12 @@ FsRtlAddBaseMcbEntry(IN PBASE_MCB OpaqueMcb,
|
||||
IN LONGLONG SectorCount)
|
||||
{
|
||||
BOOLEAN Result = TRUE;
|
||||
BOOLEAN IntResult;
|
||||
PBASE_MCB_INTERNAL Mcb = (PBASE_MCB_INTERNAL)OpaqueMcb;
|
||||
LARGE_MCB_MAPPING_ENTRY Node, NeedleRun;
|
||||
PLARGE_MCB_MAPPING_ENTRY LowerRun, HigherRun;
|
||||
BOOLEAN NewElement;
|
||||
LONGLONG IntLbn;
|
||||
|
||||
DPRINT("FsRtlAddBaseMcbEntry(%p, %I64d, %I64d, %I64d)\n", OpaqueMcb, Vbn, Lbn, SectorCount);
|
||||
|
||||
@@ -154,6 +156,16 @@ FsRtlAddBaseMcbEntry(IN PBASE_MCB OpaqueMcb,
|
||||
goto quit;
|
||||
}
|
||||
|
||||
IntResult = FsRtlLookupBaseMcbEntry(OpaqueMcb, Vbn, &IntLbn, NULL, NULL, NULL, NULL);
|
||||
if (IntResult)
|
||||
{
|
||||
if (IntLbn != -1 && IntLbn != Lbn)
|
||||
{
|
||||
Result = FALSE;
|
||||
goto quit;
|
||||
}
|
||||
}
|
||||
|
||||
/* clean any possible previous entries in our range */
|
||||
FsRtlRemoveBaseMcbEntry(OpaqueMcb, Vbn, SectorCount);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user