mirror of
https://github.com/reactos/reactos.git
synced 2024-07-27 22:58:42 +00:00
Fixed a minor bug in MmAllocateSection().
svn path=/trunk/; revision=2292
This commit is contained in:
parent
78869da85f
commit
ef4b8d4947
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: section.c,v 1.62 2001/09/25 19:52:28 dwelch Exp $
|
/* $Id: section.c,v 1.63 2001/10/10 22:40:36 hbirr Exp $
|
||||||
*
|
*
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
* FILE: ntoskrnl/mm/section.c
|
* FILE: ntoskrnl/mm/section.c
|
||||||
|
@ -289,11 +289,11 @@ MiReadPage(PMEMORY_AREA MemoryArea,
|
||||||
* alignment less than the file system block size.
|
* alignment less than the file system block size.
|
||||||
*/
|
*/
|
||||||
Status = CcRosGetCacheSegment(Fcb->Bcb,
|
Status = CcRosGetCacheSegment(Fcb->Bcb,
|
||||||
(ULONG)Offset->QuadPart,
|
(ULONG)Offset->QuadPart,
|
||||||
&BaseOffset,
|
&BaseOffset,
|
||||||
&BaseAddress,
|
&BaseAddress,
|
||||||
&UptoDate,
|
&UptoDate,
|
||||||
&CacheSeg);
|
&CacheSeg);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
return(Status);
|
return(Status);
|
||||||
|
@ -322,7 +322,7 @@ MiReadPage(PMEMORY_AREA MemoryArea,
|
||||||
/*
|
/*
|
||||||
* Retrieve the page from the cache segment that we actually want.
|
* Retrieve the page from the cache segment that we actually want.
|
||||||
*/
|
*/
|
||||||
Addr = MmGetPhysicalAddress(BaseAddress +
|
Addr = MmGetPhysicalAddress(BaseAddress +
|
||||||
Offset->QuadPart - BaseOffset);
|
Offset->QuadPart - BaseOffset);
|
||||||
(*Page) = (PVOID)(ULONG)Addr.QuadPart;
|
(*Page) = (PVOID)(ULONG)Addr.QuadPart;
|
||||||
MmReferencePage((*Page));
|
MmReferencePage((*Page));
|
||||||
|
@ -342,7 +342,7 @@ MiReadPage(PMEMORY_AREA MemoryArea,
|
||||||
MmWaitForFreePages();
|
MmWaitForFreePages();
|
||||||
(*Page) = MmAllocPage(0);
|
(*Page) = MmAllocPage(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create an mdl to hold the page we are going to read data into.
|
* Create an mdl to hold the page we are going to read data into.
|
||||||
*/
|
*/
|
||||||
|
@ -360,9 +360,9 @@ MiReadPage(PMEMORY_AREA MemoryArea,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
MmNotPresentFaultSectionView(PMADDRESS_SPACE AddressSpace,
|
MmNotPresentFaultSectionView(PMADDRESS_SPACE AddressSpace,
|
||||||
MEMORY_AREA* MemoryArea,
|
MEMORY_AREA* MemoryArea,
|
||||||
PVOID Address,
|
PVOID Address,
|
||||||
BOOLEAN Locked)
|
BOOLEAN Locked)
|
||||||
{
|
{
|
||||||
|
@ -596,7 +596,7 @@ MmNotPresentFaultSectionView(PMADDRESS_SPACE AddressSpace,
|
||||||
* FIXME: What do we know in this case?
|
* FIXME: What do we know in this case?
|
||||||
*/
|
*/
|
||||||
DPRINT1("IoPageRead failed (Status %x)\n", Status);
|
DPRINT1("IoPageRead failed (Status %x)\n", Status);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Cleanup and release locks
|
* Cleanup and release locks
|
||||||
*/
|
*/
|
||||||
|
@ -2200,7 +2200,7 @@ MmAllocateSection (IN ULONG Length)
|
||||||
0,
|
0,
|
||||||
&marea,
|
&marea,
|
||||||
FALSE);
|
FALSE);
|
||||||
if (!NT_SUCCESS(STATUS_SUCCESS))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
MmUnlockAddressSpace(AddressSpace);
|
MmUnlockAddressSpace(AddressSpace);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
Loading…
Reference in a new issue