mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[0.4.11] Revert "[NTOSKRNL] Properly align VACB writes"
to avoid CORE-15384 "ros corrupts FAT16 partition"
This reverts commit 0.4.11-dev-210-g
2a80ae2bb6
This commit is contained in:
parent
b906163dc1
commit
78cd6265d9
1 changed files with 4 additions and 9 deletions
|
@ -81,7 +81,7 @@ NTAPI
|
||||||
CcReadVirtualAddress (
|
CcReadVirtualAddress (
|
||||||
PROS_VACB Vacb)
|
PROS_VACB Vacb)
|
||||||
{
|
{
|
||||||
ULONG Size;
|
ULONG Size, Pages;
|
||||||
PMDL Mdl;
|
PMDL Mdl;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
IO_STATUS_BLOCK IoStatus;
|
IO_STATUS_BLOCK IoStatus;
|
||||||
|
@ -95,11 +95,10 @@ CcReadVirtualAddress (
|
||||||
}
|
}
|
||||||
Size = LargeSize.LowPart;
|
Size = LargeSize.LowPart;
|
||||||
|
|
||||||
Size = ROUND_TO_PAGES(Size);
|
Pages = BYTES_TO_PAGES(Size);
|
||||||
ASSERT(Size <= VACB_MAPPING_GRANULARITY);
|
ASSERT(Pages * PAGE_SIZE <= VACB_MAPPING_GRANULARITY);
|
||||||
ASSERT(Size > 0);
|
|
||||||
|
|
||||||
Mdl = IoAllocateMdl(Vacb->BaseAddress, Size, FALSE, FALSE, NULL);
|
Mdl = IoAllocateMdl(Vacb->BaseAddress, Pages * PAGE_SIZE, FALSE, FALSE, NULL);
|
||||||
if (!Mdl)
|
if (!Mdl)
|
||||||
{
|
{
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
@ -178,10 +177,6 @@ CcWriteVirtualAddress (
|
||||||
} while (++i < (Size >> PAGE_SHIFT));
|
} while (++i < (Size >> PAGE_SHIFT));
|
||||||
}
|
}
|
||||||
|
|
||||||
Size = ROUND_TO_PAGES(Size);
|
|
||||||
ASSERT(Size <= VACB_MAPPING_GRANULARITY);
|
|
||||||
ASSERT(Size > 0);
|
|
||||||
|
|
||||||
Mdl = IoAllocateMdl(Vacb->BaseAddress, Size, FALSE, FALSE, NULL);
|
Mdl = IoAllocateMdl(Vacb->BaseAddress, Size, FALSE, FALSE, NULL);
|
||||||
if (!Mdl)
|
if (!Mdl)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue