mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +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:
parent
57c45625a3
commit
7598e7c2c4
1 changed files with 12 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue