Author: gedmurphy
Date: Fri Jul 8 13:41:31 2016
New Revision: 71863
URL:
http://svn.reactos.org/svn/reactos?rev=71863&view=rev
Log:
- Slight code cleanup
- Add missing PAGED_CODE (thanks thomas)
Modified:
trunk/reactos/ntoskrnl/io/iomgr/device.c
trunk/reactos/ntoskrnl/io/iomgr/file.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/device.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/device.c…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/device.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/device.c [iso-8859-1] Fri Jul 8 13:41:31 2016
@@ -1352,8 +1352,8 @@
PFILE_OBJECT_EXTENSION FileObjectExtension;
ASSERT(FALSE);
- /* The extension buffer comes directly after the file object */
- FileObjectExtension = (PFILE_OBJECT_EXTENSION)(FileObject + 1);
+ /* Cast the buffer to something we understand */
+ FileObjectExtension = FileObject->FileObjectExtension;
/* Check if have a replacement top level device */
if (FileObjectExtension->TopDeviceObjectHint)
Modified: trunk/reactos/ntoskrnl/io/iomgr/file.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/file.c?r…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/file.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/file.c [iso-8859-1] Fri Jul 8 13:41:31 2016
@@ -818,6 +818,7 @@
FileObject->Flags |= FO_FILE_OBJECT_HAS_EXTENSION;
FileObjectExtension = (PFILE_OBJECT_EXTENSION)(FileObject + 1);
+ FileObject->FileObjectExtension = FileObjectExtension;
/* Add the top level device which we'll send the request to */
if (OpenPacket->InternalFlags & IOP_USE_TOP_LEVEL_DEVICE_HINT)
@@ -2669,6 +2670,8 @@
{
ULONG Flags = 0;
+ PAGED_CODE();
+
/* Check if we were passed a device to send the create request to*/
if (DeviceObject)
{