2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>

Changes for compiling with w32api

	* include/ddk/cctypes.h (PREACTOS_COMMON_FCB_HEADER): Remove.
	(FSRTL_COMMON_FCB_HEADER): Add.
	* include/ddk/iotypes.h (FILE_OBJECT): Rename field
	SectionObjectPointers to SectionObjectPointer.
	* ntoskrnl/cc/copy.c, ntoskrnl/cc/misc.c, ntoskrnl/cc/pin.c,
	ntoskrnl/cc/view.c, ntoskrnl/io/rawfs.c, ntoskrnl/mm/section.c,
	drivers/fs/cdfs/cleanup.c, drivers/fs/cdfs/fcb.c,
	drivers/fs/cdfs/fsctl.c, drivers/fs/ntfs/fcb.c, drivers/fs/ntfs/fsctl.c,
	drivers/fs/vfat/close.c, drivers/fs/vfat/create.c,
	drivers/fs/vfat/finfo.c, drivers/fs/vfat/fcb.c, drivers/fs/vfat/fsctl.c:
	Use new	FILE_OBJECT structure.
	* drivers/fs/cdfs/cdfs.h, drivers/fs/ntfs/ntfs.h, drivers/fs/vfat/vfat.h:
	Use new FSRTL_COMMON_FCB_HEADER structure.
	* drivers/net/afd/include/afd.h (FSRTL_COMMON_FCB_HEADER): Remove.
	* include/ddk/ketypes.h (KQUEUE): Match w32api structure.
	* ntoskrnl/ke/queue.c, ntoskrnl/ke/wait.c: Use new structure.
	* ntoskrnl/ke/spinlock.c (KeAcquireSpinLockAtDpcLevel,
	KeReleaseSpinLockFromDpcLevel): Undefine before declaring.

svn path=/trunk/; revision=4865
This commit is contained in:
Casper Hornstrup 2003-06-07 11:34:36 +00:00
parent 83f9a49a15
commit 922b9fdf46
27 changed files with 128 additions and 111 deletions

View file

@ -1,3 +1,26 @@
2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
Changes for compiling with w32api
* include/ddk/cctypes.h (PREACTOS_COMMON_FCB_HEADER): Remove.
(FSRTL_COMMON_FCB_HEADER): Add.
* include/ddk/iotypes.h (FILE_OBJECT): Rename field
SectionObjectPointers to SectionObjectPointer.
* ntoskrnl/cc/copy.c, ntoskrnl/cc/misc.c, ntoskrnl/cc/pin.c,
ntoskrnl/cc/view.c, ntoskrnl/io/rawfs.c, ntoskrnl/mm/section.c,
drivers/fs/cdfs/cleanup.c, drivers/fs/cdfs/fcb.c,
drivers/fs/cdfs/fsctl.c, drivers/fs/ntfs/fcb.c, drivers/fs/ntfs/fsctl.c,
drivers/fs/vfat/close.c, drivers/fs/vfat/create.c,
drivers/fs/vfat/finfo.c, drivers/fs/vfat/fcb.c, drivers/fs/vfat/fsctl.c:
Use new FILE_OBJECT structure.
* drivers/fs/cdfs/cdfs.h, drivers/fs/ntfs/ntfs.h, drivers/fs/vfat/vfat.h:
Use new FSRTL_COMMON_FCB_HEADER structure.
* drivers/net/afd/include/afd.h (FSRTL_COMMON_FCB_HEADER): Remove.
* include/ddk/ketypes.h (KQUEUE): Match w32api structure.
* ntoskrnl/ke/queue.c, ntoskrnl/ke/wait.c: Use new structure.
* ntoskrnl/ke/spinlock.c (KeAcquireSpinLockAtDpcLevel,
KeReleaseSpinLockFromDpcLevel): Undefine before declaring.
2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net> 2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
Changes for compiling with w32api Changes for compiling with w32api

View file

@ -163,7 +163,7 @@ typedef struct
typedef struct _FCB typedef struct _FCB
{ {
REACTOS_COMMON_FCB_HEADER RFCB; FSRTL_COMMON_FCB_HEADER RFCB;
SECTION_OBJECT_POINTERS SectionObjectPointers; SECTION_OBJECT_POINTERS SectionObjectPointers;
PFILE_OBJECT FileObject; PFILE_OBJECT FileObject;

View file

@ -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: cleanup.c,v 1.3 2003/02/13 22:24:15 hbirr Exp $ /* $Id: cleanup.c,v 1.4 2003/06/07 11:34:35 chorns Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -52,7 +52,7 @@ CdfsCleanupFile(PDEVICE_EXTENSION DeviceExt,
/* Uninitialize file cache if initialized for this file object. */ /* Uninitialize file cache if initialized for this file object. */
if (FileObject->SectionObjectPointers && FileObject->SectionObjectPointers->SharedCacheMap) if (FileObject->SectionObjectPointer && FileObject->SectionObjectPointer->SharedCacheMap)
{ {
CcRosReleaseFileCache (FileObject); CcRosReleaseFileCache (FileObject);
} }

View file

@ -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: fcb.c,v 1.12 2003/02/13 22:24:15 hbirr Exp $ /* $Id: fcb.c,v 1.13 2003/06/07 11:34:35 chorns Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -236,7 +236,7 @@ CdfsFCBInitializeCache(PVCB Vcb,
FileObject->Flags = FileObject->Flags | FO_FCB_IS_VALID | FileObject->Flags = FileObject->Flags | FO_FCB_IS_VALID |
FO_DIRECT_CACHE_PAGING_READ; FO_DIRECT_CACHE_PAGING_READ;
FileObject->SectionObjectPointers = &Fcb->SectionObjectPointers; FileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
FileObject->FsContext = Fcb; FileObject->FsContext = Fcb;
FileObject->FsContext2 = newCCB; FileObject->FsContext2 = newCCB;
newCCB->PtrFileObject = FileObject; newCCB->PtrFileObject = FileObject;
@ -414,7 +414,7 @@ CdfsAttachFCBToFileObject(PDEVICE_EXTENSION Vcb,
FileObject->Flags = FileObject->Flags | FO_FCB_IS_VALID | FileObject->Flags = FileObject->Flags | FO_FCB_IS_VALID |
FO_DIRECT_CACHE_PAGING_READ; FO_DIRECT_CACHE_PAGING_READ;
FileObject->SectionObjectPointers = &Fcb->SectionObjectPointers; FileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
FileObject->FsContext = Fcb; FileObject->FsContext = Fcb;
FileObject->FsContext2 = newCCB; FileObject->FsContext2 = newCCB;
newCCB->PtrFileObject = FileObject; newCCB->PtrFileObject = FileObject;

View file

@ -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: fsctl.c,v 1.13 2003/02/13 22:24:15 hbirr Exp $ /* $Id: fsctl.c,v 1.14 2003/06/07 11:34:35 chorns Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -381,7 +381,7 @@ CdfsMountVolume(PDEVICE_OBJECT DeviceObject,
DeviceExt->StreamFileObject->Flags = DeviceExt->StreamFileObject->Flags | FO_FCB_IS_VALID | FO_DIRECT_CACHE_PAGING_READ; DeviceExt->StreamFileObject->Flags = DeviceExt->StreamFileObject->Flags | FO_FCB_IS_VALID | FO_DIRECT_CACHE_PAGING_READ;
DeviceExt->StreamFileObject->FsContext = Fcb; DeviceExt->StreamFileObject->FsContext = Fcb;
DeviceExt->StreamFileObject->FsContext2 = Ccb; DeviceExt->StreamFileObject->FsContext2 = Ccb;
DeviceExt->StreamFileObject->SectionObjectPointers = &Fcb->SectionObjectPointers; DeviceExt->StreamFileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
DeviceExt->StreamFileObject->PrivateCacheMap = NULL; DeviceExt->StreamFileObject->PrivateCacheMap = NULL;
DeviceExt->StreamFileObject->Vpb = DeviceExt->Vpb; DeviceExt->StreamFileObject->Vpb = DeviceExt->Vpb;
Ccb->PtrFileObject = DeviceExt->StreamFileObject; Ccb->PtrFileObject = DeviceExt->StreamFileObject;

View file

@ -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: fcb.c,v 1.5 2003/02/13 22:24:16 hbirr Exp $ /* $Id: fcb.c,v 1.6 2003/06/07 11:34:35 chorns Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -235,7 +235,7 @@ NtfsFCBInitializeCache(PVCB Vcb,
FileObject->Flags = FileObject->Flags | FO_FCB_IS_VALID | FileObject->Flags = FileObject->Flags | FO_FCB_IS_VALID |
FO_DIRECT_CACHE_PAGING_READ; FO_DIRECT_CACHE_PAGING_READ;
FileObject->SectionObjectPointers = &Fcb->SectionObjectPointers; FileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
FileObject->FsContext = Fcb; FileObject->FsContext = Fcb;
FileObject->FsContext2 = newCCB; FileObject->FsContext2 = newCCB;
newCCB->PtrFileObject = FileObject; newCCB->PtrFileObject = FileObject;
@ -406,7 +406,7 @@ NtfsAttachFCBToFileObject(PDEVICE_EXTENSION Vcb,
FileObject->Flags = FileObject->Flags | FO_FCB_IS_VALID | FileObject->Flags = FileObject->Flags | FO_FCB_IS_VALID |
FO_DIRECT_CACHE_PAGING_READ; FO_DIRECT_CACHE_PAGING_READ;
FileObject->SectionObjectPointers = &Fcb->SectionObjectPointers; FileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
FileObject->FsContext = Fcb; FileObject->FsContext = Fcb;
FileObject->FsContext2 = newCCB; FileObject->FsContext2 = newCCB;
newCCB->PtrFileObject = FileObject; newCCB->PtrFileObject = FileObject;

View file

@ -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: fsctl.c,v 1.5 2003/02/13 22:24:16 hbirr Exp $ /* $Id: fsctl.c,v 1.6 2003/06/07 11:34:36 chorns Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -277,7 +277,7 @@ NtfsMountVolume(PDEVICE_OBJECT DeviceObject,
DeviceExt->StreamFileObject->Flags = DeviceExt->StreamFileObject->Flags | FO_FCB_IS_VALID | FO_DIRECT_CACHE_PAGING_READ; DeviceExt->StreamFileObject->Flags = DeviceExt->StreamFileObject->Flags | FO_FCB_IS_VALID | FO_DIRECT_CACHE_PAGING_READ;
DeviceExt->StreamFileObject->FsContext = Fcb; DeviceExt->StreamFileObject->FsContext = Fcb;
DeviceExt->StreamFileObject->FsContext2 = Ccb; DeviceExt->StreamFileObject->FsContext2 = Ccb;
DeviceExt->StreamFileObject->SectionObjectPointers = &Fcb->SectionObjectPointers; DeviceExt->StreamFileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
DeviceExt->StreamFileObject->PrivateCacheMap = NULL; DeviceExt->StreamFileObject->PrivateCacheMap = NULL;
DeviceExt->StreamFileObject->Vpb = DeviceExt->Vpb; DeviceExt->StreamFileObject->Vpb = DeviceExt->Vpb;
Ccb->PtrFileObject = DeviceExt->StreamFileObject; Ccb->PtrFileObject = DeviceExt->StreamFileObject;

View file

@ -78,7 +78,7 @@ typedef struct
typedef struct _FCB typedef struct _FCB
{ {
REACTOS_COMMON_FCB_HEADER RFCB; FSRTL_COMMON_FCB_HEADER RFCB;
SECTION_OBJECT_POINTERS SectionObjectPointers; SECTION_OBJECT_POINTERS SectionObjectPointers;
PFILE_OBJECT FileObject; PFILE_OBJECT FileObject;

View file

@ -1,4 +1,4 @@
/* $Id: close.c,v 1.17 2003/02/13 22:24:16 hbirr Exp $ /* $Id: close.c,v 1.18 2003/06/07 11:34:36 chorns Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -67,7 +67,7 @@ VfatCloseFile (PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject)
FileObject->FsContext2 = NULL; FileObject->FsContext2 = NULL;
FileObject->FsContext = NULL; FileObject->FsContext = NULL;
FileObject->SectionObjectPointers = NULL; FileObject->SectionObjectPointer = NULL;
if (pCcb) if (pCcb)
{ {

View file

@ -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: create.c,v 1.56 2003/05/11 09:51:26 hbirr Exp $ /* $Id: create.c,v 1.57 2003/06/07 11:34:36 chorns Exp $
* *
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: services/fs/vfat/create.c * FILE: services/fs/vfat/create.c
@ -490,7 +490,7 @@ VfatSupersedeFile(PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject,
Fcb->RFCB.ValidDataLength.QuadPart = 0; Fcb->RFCB.ValidDataLength.QuadPart = 0;
/* Notify cache manager about the change in file size if caching is /* Notify cache manager about the change in file size if caching is
initialized on the file stream */ initialized on the file stream */
if (FileObject->SectionObjectPointers->SharedCacheMap != NULL) if (FileObject->SectionObjectPointer->SharedCacheMap != NULL)
{ {
CcSetFileSizes(FileObject, (PCC_FILE_SIZES)&Fcb->RFCB.AllocationSize); CcSetFileSizes(FileObject, (PCC_FILE_SIZES)&Fcb->RFCB.AllocationSize);
} }
@ -558,7 +558,7 @@ VfatCreateFile (PDEVICE_OBJECT DeviceObject, PIRP Irp)
} }
memset(pCcb, 0, sizeof(VFATCCB)); memset(pCcb, 0, sizeof(VFATCCB));
FileObject->Flags |= FO_FCB_IS_VALID; FileObject->Flags |= FO_FCB_IS_VALID;
FileObject->SectionObjectPointers = &pFcb->SectionObjectPointers; FileObject->SectionObjectPointer = &pFcb->SectionObjectPointers;
FileObject->FsContext = pFcb; FileObject->FsContext = pFcb;
FileObject->FsContext2 = pCcb; FileObject->FsContext2 = pCcb;
pFcb->RefCount++; pFcb->RefCount++;

View file

@ -1,4 +1,4 @@
/* $Id: fcb.c,v 1.28 2003/05/11 09:51:26 hbirr Exp $ /* $Id: fcb.c,v 1.29 2003/06/07 11:34:36 chorns Exp $
* *
* *
* FILE: fcb.c * FILE: fcb.c
@ -154,7 +154,7 @@ vfatReleaseFCB(PDEVICE_EXTENSION pVCB, PVFATFCB pFCB)
if (vfatFCBIsDirectory(pFCB)) if (vfatFCBIsDirectory(pFCB))
{ {
/* Uninitialize file cache if initialized for this file object. */ /* Uninitialize file cache if initialized for this file object. */
if (pFCB->FileObject->SectionObjectPointers->SharedCacheMap) if (pFCB->FileObject->SectionObjectPointer->SharedCacheMap)
{ {
CcRosReleaseFileCache(pFCB->FileObject); CcRosReleaseFileCache(pFCB->FileObject);
} }
@ -284,7 +284,7 @@ vfatFCBInitializeCacheFromVolume (PVCB vcb, PVFATFCB fcb)
memset (newCCB, 0, sizeof (VFATCCB)); memset (newCCB, 0, sizeof (VFATCCB));
fileObject->Flags |= FO_FCB_IS_VALID | FO_DIRECT_CACHE_PAGING_READ; fileObject->Flags |= FO_FCB_IS_VALID | FO_DIRECT_CACHE_PAGING_READ;
fileObject->SectionObjectPointers = &fcb->SectionObjectPointers; fileObject->SectionObjectPointer = &fcb->SectionObjectPointers;
fileObject->FsContext = fcb; fileObject->FsContext = fcb;
fileObject->FsContext2 = newCCB; fileObject->FsContext2 = newCCB;
fcb->FileObject = fileObject; fcb->FileObject = fileObject;
@ -461,7 +461,7 @@ vfatAttachFCBToFileObject (PDEVICE_EXTENSION vcb,
fileObject->Flags = fileObject->Flags | FO_FCB_IS_VALID | fileObject->Flags = fileObject->Flags | FO_FCB_IS_VALID |
FO_DIRECT_CACHE_PAGING_READ; FO_DIRECT_CACHE_PAGING_READ;
fileObject->SectionObjectPointers = &fcb->SectionObjectPointers; fileObject->SectionObjectPointer = &fcb->SectionObjectPointers;
fileObject->FsContext = fcb; fileObject->FsContext = fcb;
fileObject->FsContext2 = newCCB; fileObject->FsContext2 = newCCB;
DPRINT ("file open: fcb:%x file size: %d\n", fcb, fcb->entry.FileSize); DPRINT ("file open: fcb:%x file size: %d\n", fcb, fcb->entry.FileSize);

View file

@ -1,4 +1,4 @@
/* $Id: finfo.c,v 1.29 2003/06/04 18:01:02 hbirr Exp $ /* $Id: finfo.c,v 1.30 2003/06/07 11:34:36 chorns Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -193,13 +193,13 @@ VfatSetDispositionInformation(PFILE_OBJECT FileObject,
} }
if (DispositionInfo->DoDeleteFile) if (DispositionInfo->DoDeleteFile)
{ {
if (MmFlushImageSection (FileObject->SectionObjectPointers, MmFlushForDelete)) if (MmFlushImageSection (FileObject->SectionObjectPointer, MmFlushForDelete))
{ {
KeAcquireSpinLock (&DeviceExt->FcbListLock, &oldIrql); KeAcquireSpinLock (&DeviceExt->FcbListLock, &oldIrql);
count = FCB->RefCount; count = FCB->RefCount;
if (FCB->RefCount > 1) if (FCB->RefCount > 1)
{ {
DPRINT1("%d %x\n", FCB->RefCount, CcGetFileObjectFromSectionPtrs(FileObject->SectionObjectPointers)); DPRINT1("%d %x\n", FCB->RefCount, CcGetFileObjectFromSectionPtrs(FileObject->SectionObjectPointer));
Status = STATUS_ACCESS_DENIED; Status = STATUS_ACCESS_DENIED;
} }
else else
@ -402,7 +402,7 @@ VOID UpdateFileSize(PFILE_OBJECT FileObject, PVFATFCB Fcb, ULONG Size, ULONG Clu
Fcb->RFCB.FileSize.QuadPart = Size; Fcb->RFCB.FileSize.QuadPart = Size;
Fcb->RFCB.ValidDataLength.QuadPart = Size; Fcb->RFCB.ValidDataLength.QuadPart = Size;
if (FileObject->SectionObjectPointers->SharedCacheMap != NULL) if (FileObject->SectionObjectPointer->SharedCacheMap != NULL)
{ {
CcSetFileSizes(FileObject, (PCC_FILE_SIZES)&Fcb->RFCB.AllocationSize); CcSetFileSizes(FileObject, (PCC_FILE_SIZES)&Fcb->RFCB.AllocationSize);
} }

View file

@ -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: fsctl.c,v 1.15 2003/05/11 09:51:26 hbirr Exp $ /* $Id: fsctl.c,v 1.16 2003/06/07 11:34:36 chorns Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -303,7 +303,7 @@ VfatMount (PVFAT_IRP_CONTEXT IrpContext)
DeviceExt->FATFileObject->Flags = DeviceExt->FATFileObject->Flags | FO_FCB_IS_VALID | FO_DIRECT_CACHE_PAGING_READ; DeviceExt->FATFileObject->Flags = DeviceExt->FATFileObject->Flags | FO_FCB_IS_VALID | FO_DIRECT_CACHE_PAGING_READ;
DeviceExt->FATFileObject->FsContext = Fcb; DeviceExt->FATFileObject->FsContext = Fcb;
DeviceExt->FATFileObject->FsContext2 = Ccb; DeviceExt->FATFileObject->FsContext2 = Ccb;
DeviceExt->FATFileObject->SectionObjectPointers = &Fcb->SectionObjectPointers; DeviceExt->FATFileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
DeviceExt->FATFileObject->PrivateCacheMap = NULL; DeviceExt->FATFileObject->PrivateCacheMap = NULL;
DeviceExt->FATFileObject->Vpb = DeviceObject->Vpb; DeviceExt->FATFileObject->Vpb = DeviceObject->Vpb;
Fcb->FileObject = DeviceExt->FATFileObject; Fcb->FileObject = DeviceExt->FATFileObject;

View file

@ -1,4 +1,4 @@
/* $Id: vfat.h,v 1.57 2003/05/11 09:51:26 hbirr Exp $ */ /* $Id: vfat.h,v 1.58 2003/06/07 11:34:36 chorns Exp $ */
#include <ddk/ntifs.h> #include <ddk/ntifs.h>
@ -182,7 +182,7 @@ extern PVFAT_GLOBAL_DATA VfatGlobalData;
typedef struct _VFATFCB typedef struct _VFATFCB
{ {
/* FCB header required by ROS/NT */ /* FCB header required by ROS/NT */
REACTOS_COMMON_FCB_HEADER RFCB; FSRTL_COMMON_FCB_HEADER RFCB;
SECTION_OBJECT_POINTERS SectionObjectPointers; SECTION_OBJECT_POINTERS SectionObjectPointers;
ERESOURCE MainResource; ERESOURCE MainResource;
ERESOURCE PagingIoResource; ERESOURCE PagingIoResource;

View file

@ -35,21 +35,6 @@ typedef struct _AFDCCB {
/* Flags for CCB structure */ /* Flags for CCB structure */
#define CCB_CLEANED 0x00000001 #define CCB_CLEANED 0x00000001
/* Borrowed from http://www.acc.umu.se/~bosse/ntifs.h by Bo Branten */
typedef struct _FSRTL_COMMON_FCB_HEADER {
CSHORT NodeTypeCode;
CSHORT NodeByteSize;
UCHAR Flags;
UCHAR IsFastIoPossible;
UCHAR Flags2;
UCHAR Reserved;
PERESOURCE Resource;
PERESOURCE PagingIoResource;
LARGE_INTEGER AllocationSize;
LARGE_INTEGER FileSize;
LARGE_INTEGER ValidDataLength;
} FSRTL_COMMON_FCB_HEADER, *PFSRTL_COMMON_FCB_HEADER;
typedef struct _FsdNTRequiredFCB { typedef struct _FsdNTRequiredFCB {
FSRTL_COMMON_FCB_HEADER CommonFCBHeader; FSRTL_COMMON_FCB_HEADER CommonFCBHeader;
SECTION_OBJECT_POINTERS SectionObject; SECTION_OBJECT_POINTERS SectionObject;

View file

@ -73,13 +73,18 @@ typedef VOID STDCALL_FUNC
(*PFLUSH_TO_LSN)(IN PVOID LogHandle, (*PFLUSH_TO_LSN)(IN PVOID LogHandle,
IN LARGE_INTEGER Lsn); IN LARGE_INTEGER Lsn);
typedef struct _REACTOS_COMMON_FCB_HEADER typedef struct _FSRTL_COMMON_FCB_HEADER {
{ CSHORT NodeTypeCode;
CSHORT NodeTypeCode; CSHORT NodeByteSize;
CSHORT NodeByteSize; UCHAR Flags;
LARGE_INTEGER AllocationSize; UCHAR IsFastIoPossible;
LARGE_INTEGER FileSize; UCHAR Flags2;
LARGE_INTEGER ValidDataLength; UCHAR Reserved;
} REACTOS_COMMON_FCB_HEADER, *PREACTOS_COMMON_FCB_HEADER; PERESOURCE Resource;
PERESOURCE PagingIoResource;
LARGE_INTEGER AllocationSize;
LARGE_INTEGER FileSize;
LARGE_INTEGER ValidDataLength;
} FSRTL_COMMON_FCB_HEADER, *PFSRTL_COMMON_FCB_HEADER;
#endif /* __INCLUDE_DDK_CCTYPES_H */ #endif /* __INCLUDE_DDK_CCTYPES_H */

View file

@ -1,4 +1,4 @@
/* $Id: iotypes.h,v 1.48 2003/05/28 18:09:09 chorns Exp $ /* $Id: iotypes.h,v 1.49 2003/06/07 11:34:36 chorns Exp $
* *
*/ */
@ -595,7 +595,7 @@ typedef struct _FILE_OBJECT
struct _VPB* Vpb; struct _VPB* Vpb;
PVOID FsContext; PVOID FsContext;
PVOID FsContext2; PVOID FsContext2;
PSECTION_OBJECT_POINTERS SectionObjectPointers; PSECTION_OBJECT_POINTERS SectionObjectPointer;
PVOID PrivateCacheMap; PVOID PrivateCacheMap;
NTSTATUS FinalStatus; NTSTATUS FinalStatus;
struct _FILE_OBJECT* RelatedFileObject; struct _FILE_OBJECT* RelatedFileObject;

View file

@ -74,8 +74,8 @@ typedef struct _KQUEUE
{ {
DISPATCHER_HEADER Header; DISPATCHER_HEADER Header;
LIST_ENTRY EntryListHead; LIST_ENTRY EntryListHead;
ULONG RunningThreads; ULONG CurrentCount;
ULONG MaximumThreads; ULONG MaximumCount;
LIST_ENTRY ThreadListHead; LIST_ENTRY ThreadListHead;
} KQUEUE, *PKQUEUE; } KQUEUE, *PKQUEUE;

View file

@ -1,4 +1,4 @@
/* $Id: copy.c,v 1.16 2003/05/25 21:50:18 hbirr Exp $ /* $Id: copy.c,v 1.17 2003/06/07 11:34:36 chorns Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -267,7 +267,7 @@ CcCopyRead (IN PFILE_OBJECT FileObject,
FileObject, (ULONG)FileOffset->QuadPart, Length, Wait, FileObject, (ULONG)FileOffset->QuadPart, Length, Wait,
Buffer, IoStatus); Buffer, IoStatus);
Bcb = FileObject->SectionObjectPointers->SharedCacheMap; Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
ReadOffset = FileOffset->QuadPart; ReadOffset = FileOffset->QuadPart;
DPRINT("AllocationSize %d, FileSize %d\n", DPRINT("AllocationSize %d, FileSize %d\n",
@ -369,7 +369,7 @@ CcCopyWrite (IN PFILE_OBJECT FileObject,
"Length %d, Wait %d, Buffer %x)\n", "Length %d, Wait %d, Buffer %x)\n",
FileObject, (ULONG)FileOffset->QuadPart, Length, Wait, Buffer); FileObject, (ULONG)FileOffset->QuadPart, Length, Wait, Buffer);
Bcb = FileObject->SectionObjectPointers->SharedCacheMap; Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
WriteOffset = (ULONG)FileOffset->QuadPart; WriteOffset = (ULONG)FileOffset->QuadPart;
if (!Wait) if (!Wait)
@ -473,7 +473,7 @@ CcZeroData (IN PFILE_OBJECT FileObject,
Length = EndOffset->u.LowPart - StartOffset->u.LowPart; Length = EndOffset->u.LowPart - StartOffset->u.LowPart;
if (FileObject->SectionObjectPointers->SharedCacheMap == NULL) if (FileObject->SectionObjectPointer->SharedCacheMap == NULL)
{ {
/* File is not cached */ /* File is not cached */
WriteOffset.QuadPart = StartOffset->QuadPart; WriteOffset.QuadPart = StartOffset->QuadPart;
@ -533,7 +533,7 @@ CcZeroData (IN PFILE_OBJECT FileObject,
PHYSICAL_ADDRESS page; PHYSICAL_ADDRESS page;
Start = StartOffset->u.LowPart; Start = StartOffset->u.LowPart;
Bcb = FileObject->SectionObjectPointers->SharedCacheMap; Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
if (Wait) if (Wait)
{ {
/* testing, if the requested datas are available */ /* testing, if the requested datas are available */

View file

@ -91,7 +91,7 @@ CcSetFileSizes (IN PFILE_OBJECT FileObject,
(ULONG)FileSizes->FileSize.QuadPart, (ULONG)FileSizes->FileSize.QuadPart,
(ULONG)FileSizes->ValidDataLength.QuadPart); (ULONG)FileSizes->ValidDataLength.QuadPart);
Bcb = FileObject->SectionObjectPointers->SharedCacheMap; Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
assert(Bcb); assert(Bcb);
if (FileSizes->AllocationSize.QuadPart < Bcb->AllocationSize.QuadPart) if (FileSizes->AllocationSize.QuadPart < Bcb->AllocationSize.QuadPart)

View file

@ -1,4 +1,4 @@
/* $Id: pin.c,v 1.11 2003/02/13 22:24:18 hbirr Exp $ /* $Id: pin.c,v 1.12 2003/06/07 11:34:36 chorns Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -51,7 +51,7 @@ CcMapData (IN PFILE_OBJECT FileObject,
Length, Wait, pBcb, pBuffer); Length, Wait, pBcb, pBuffer);
ReadOffset = FileOffset->QuadPart; ReadOffset = FileOffset->QuadPart;
Bcb = FileObject->SectionObjectPointers->SharedCacheMap; Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
assert(Bcb); assert(Bcb);
DPRINT("AllocationSize %d, FileSize %d\n", DPRINT("AllocationSize %d, FileSize %d\n",

View file

@ -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: view.c,v 1.61 2003/06/06 21:02:42 hbirr Exp $ /* $Id: view.c,v 1.62 2003/06/07 11:34:36 chorns Exp $
* *
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/cc/view.c * FILE: ntoskrnl/cc/view.c
@ -922,7 +922,7 @@ CcRosDeleteFileCache(PFILE_OBJECT FileObject, PBCB Bcb)
Bcb->RefCount++; Bcb->RefCount++;
ExReleaseFastMutex(&ViewLock); ExReleaseFastMutex(&ViewLock);
CcFlushCache(FileObject->SectionObjectPointers, NULL, 0, NULL); CcFlushCache(FileObject->SectionObjectPointer, NULL, 0, NULL);
ExAcquireFastMutex(&ViewLock); ExAcquireFastMutex(&ViewLock);
Bcb->RefCount--; Bcb->RefCount--;
@ -934,7 +934,7 @@ CcRosDeleteFileCache(PFILE_OBJECT FileObject, PBCB Bcb)
Bcb->BcbRemoveListEntry.Flink = NULL; Bcb->BcbRemoveListEntry.Flink = NULL;
} }
FileObject->SectionObjectPointers->SharedCacheMap = NULL; FileObject->SectionObjectPointer->SharedCacheMap = NULL;
/* /*
* Release all cache segments. * Release all cache segments.
@ -977,7 +977,7 @@ VOID CcRosReferenceCache(PFILE_OBJECT FileObject)
{ {
PBCB Bcb; PBCB Bcb;
ExAcquireFastMutex(&ViewLock); ExAcquireFastMutex(&ViewLock);
Bcb = (PBCB)FileObject->SectionObjectPointers->SharedCacheMap; Bcb = (PBCB)FileObject->SectionObjectPointer->SharedCacheMap;
assert(Bcb); assert(Bcb);
if (Bcb->RefCount == 0) if (Bcb->RefCount == 0)
{ {
@ -1016,7 +1016,7 @@ VOID CcRosDereferenceCache(PFILE_OBJECT FileObject)
{ {
PBCB Bcb; PBCB Bcb;
ExAcquireFastMutex(&ViewLock); ExAcquireFastMutex(&ViewLock);
Bcb = (PBCB)FileObject->SectionObjectPointers->SharedCacheMap; Bcb = (PBCB)FileObject->SectionObjectPointer->SharedCacheMap;
assert(Bcb); assert(Bcb);
if (Bcb->RefCount > 0) if (Bcb->RefCount > 0)
{ {
@ -1049,9 +1049,9 @@ CcRosReleaseFileCache(PFILE_OBJECT FileObject)
ExAcquireFastMutex(&ViewLock); ExAcquireFastMutex(&ViewLock);
if (FileObject->SectionObjectPointers->SharedCacheMap != NULL) if (FileObject->SectionObjectPointer->SharedCacheMap != NULL)
{ {
Bcb = FileObject->SectionObjectPointers->SharedCacheMap; Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
if (FileObject->PrivateCacheMap != NULL) if (FileObject->PrivateCacheMap != NULL)
{ {
FileObject->PrivateCacheMap = NULL; FileObject->PrivateCacheMap = NULL;
@ -1090,7 +1090,7 @@ CcRosInitializeFileCache(PFILE_OBJECT FileObject,
ExAcquireFastMutex(&ViewLock); ExAcquireFastMutex(&ViewLock);
Bcb = FileObject->SectionObjectPointers->SharedCacheMap; Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
if (Bcb == NULL) if (Bcb == NULL)
{ {
Bcb = ExAllocateFromNPagedLookasideList(&BcbLookasideList); Bcb = ExAllocateFromNPagedLookasideList(&BcbLookasideList);
@ -1109,13 +1109,13 @@ CcRosInitializeFileCache(PFILE_OBJECT FileObject,
if (FileObject->FsContext) if (FileObject->FsContext)
{ {
Bcb->AllocationSize = Bcb->AllocationSize =
((REACTOS_COMMON_FCB_HEADER*)FileObject->FsContext)->AllocationSize; ((PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext)->AllocationSize;
Bcb->FileSize = Bcb->FileSize =
((REACTOS_COMMON_FCB_HEADER*)FileObject->FsContext)->FileSize; ((PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext)->FileSize;
} }
KeInitializeSpinLock(&Bcb->BcbLock); KeInitializeSpinLock(&Bcb->BcbLock);
InitializeListHead(&Bcb->BcbSegmentListHead); InitializeListHead(&Bcb->BcbSegmentListHead);
FileObject->SectionObjectPointers->SharedCacheMap = Bcb; FileObject->SectionObjectPointer->SharedCacheMap = Bcb;
} }
if (FileObject->PrivateCacheMap == NULL) if (FileObject->PrivateCacheMap == NULL)
{ {

View file

@ -1,4 +1,4 @@
/* $Id: rawfs.c,v 1.2 2003/05/15 13:34:37 ekohl Exp $ /* $Id: rawfs.c,v 1.3 2003/06/07 11:34:36 chorns Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -65,7 +65,7 @@ typedef struct _RAWFS_IRP_CONTEXT
typedef struct _RAWFS_FCB typedef struct _RAWFS_FCB
{ {
/* Start FCB header required by ReactOS/Windows NT */ /* Start FCB header required by ReactOS/Windows NT */
REACTOS_COMMON_FCB_HEADER RFCB; FSRTL_COMMON_FCB_HEADER RFCB;
SECTION_OBJECT_POINTERS SectionObjectPointers; SECTION_OBJECT_POINTERS SectionObjectPointers;
ERESOURCE MainResource; ERESOURCE MainResource;
ERESOURCE PagingIoResource; ERESOURCE PagingIoResource;
@ -457,7 +457,7 @@ RawFsCreateFile(IN PRAWFS_IRP_CONTEXT IrpContext)
} }
FileObject->Flags |= FO_FCB_IS_VALID; FileObject->Flags |= FO_FCB_IS_VALID;
FileObject->SectionObjectPointers = &pFcb->SectionObjectPointers; FileObject->SectionObjectPointer = &pFcb->SectionObjectPointers;
FileObject->FsContext = pFcb; FileObject->FsContext = pFcb;
FileObject->FsContext2 = pCcb; FileObject->FsContext2 = pCcb;
pFcb->RefCount++; pFcb->RefCount++;

View file

@ -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: queue.c,v 1.5 2003/03/19 23:10:31 gdalsnes Exp $ /* $Id: queue.c,v 1.6 2003/06/07 11:34:36 chorns Exp $
* *
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/queue.c * FILE: ntoskrnl/ke/queue.c
@ -48,8 +48,8 @@ KeInitializeQueue(IN PKQUEUE Queue,
0); 0);
InitializeListHead(&Queue->EntryListHead); InitializeListHead(&Queue->EntryListHead);
InitializeListHead(&Queue->ThreadListHead); InitializeListHead(&Queue->ThreadListHead);
Queue->RunningThreads = 0; Queue->CurrentCount = 0;
Queue->MaximumThreads = (Count == 0) ? (ULONG) KeNumberProcessors : Count; Queue->MaximumCount = (Count == 0) ? (ULONG) KeNumberProcessors : Count;
} }
@ -85,7 +85,7 @@ KiInsertQueue(
InsertTailList(&Queue->EntryListHead, Entry); InsertTailList(&Queue->EntryListHead, Entry);
} }
if (Queue->RunningThreads < Queue->MaximumThreads && InitialState == 0) if (Queue->CurrentCount < Queue->MaximumCount && InitialState == 0)
{ {
KeDispatcherObjectWake(&Queue->Header); KeDispatcherObjectWake(&Queue->Header);
} }
@ -134,11 +134,11 @@ KeRemoveQueue(IN PKQUEUE Queue,
//associate with this queue //associate with this queue
InsertHeadList(&Queue->ThreadListHead, &Thread->QueueListEntry); InsertHeadList(&Queue->ThreadListHead, &Thread->QueueListEntry);
Queue->RunningThreads++; Queue->CurrentCount++;
Thread->Queue = Queue; Thread->Queue = Queue;
} }
if (Queue->RunningThreads <= Queue->MaximumThreads && !IsListEmpty(&Queue->EntryListHead)) if (Queue->CurrentCount <= Queue->MaximumCount && !IsListEmpty(&Queue->EntryListHead))
{ {
ListEntry = RemoveHeadList(&Queue->EntryListHead); ListEntry = RemoveHeadList(&Queue->EntryListHead);
Queue->Header.SignalState--; Queue->Header.SignalState--;

View file

@ -1,4 +1,4 @@
/* $Id: spinlock.c,v 1.15 2003/06/07 10:37:50 chorns Exp $ /* $Id: spinlock.c,v 1.16 2003/06/07 11:34:36 chorns Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -63,6 +63,8 @@ KeInitializeSpinLock (PKSPIN_LOCK SpinLock)
*SpinLock = 0; *SpinLock = 0;
} }
#undef KeAcquireSpinLockAtDpcLevel
VOID STDCALL VOID STDCALL
KeAcquireSpinLockAtDpcLevel (PKSPIN_LOCK SpinLock) KeAcquireSpinLockAtDpcLevel (PKSPIN_LOCK SpinLock)
/* /*
@ -95,6 +97,8 @@ KeAcquireSpinLockAtDpcLevel (PKSPIN_LOCK SpinLock)
} }
} }
#undef KeReleaseSpinLockFromDpcLevel
VOID STDCALL VOID STDCALL
KeReleaseSpinLockFromDpcLevel (PKSPIN_LOCK SpinLock) KeReleaseSpinLockFromDpcLevel (PKSPIN_LOCK SpinLock)
/* /*

View file

@ -634,8 +634,8 @@ KeWaitForMultipleObjects(ULONG Count,
//io completion //io completion
if (CurrentThread->Queue) if (CurrentThread->Queue)
{ {
CurrentThread->Queue->RunningThreads--; CurrentThread->Queue->CurrentCount--;
if (WaitReason != WrQueue && CurrentThread->Queue->RunningThreads < CurrentThread->Queue->MaximumThreads && if (WaitReason != WrQueue && CurrentThread->Queue->CurrentCount < CurrentThread->Queue->MaximumCount &&
!IsListEmpty(&CurrentThread->Queue->EntryListHead)) !IsListEmpty(&CurrentThread->Queue->EntryListHead))
{ {
KeDispatcherObjectWake(&CurrentThread->Queue->Header); KeDispatcherObjectWake(&CurrentThread->Queue->Header);
@ -647,7 +647,7 @@ KeWaitForMultipleObjects(ULONG Count,
//io completion //io completion
if (CurrentThread->Queue) if (CurrentThread->Queue)
{ {
CurrentThread->Queue->RunningThreads++; CurrentThread->Queue->CurrentCount++;
} }

View file

@ -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.114 2003/06/06 21:00:28 hbirr Exp $ /* $Id: section.c,v 1.115 2003/06/07 11:34:36 chorns Exp $
* *
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/section.c * FILE: ntoskrnl/mm/section.c
@ -94,14 +94,14 @@ MmFreePageTablesSectionSegment(PMM_SECTION_SEGMENT Segment)
VOID VOID
MmFreeSectionSegments(PFILE_OBJECT FileObject) MmFreeSectionSegments(PFILE_OBJECT FileObject)
{ {
if (FileObject->SectionObjectPointers->ImageSectionObject != NULL) if (FileObject->SectionObjectPointer->ImageSectionObject != NULL)
{ {
PMM_IMAGE_SECTION_OBJECT ImageSectionObject; PMM_IMAGE_SECTION_OBJECT ImageSectionObject;
ULONG i; ULONG i;
ImageSectionObject = ImageSectionObject =
(PMM_IMAGE_SECTION_OBJECT)FileObject->SectionObjectPointers-> (PMM_IMAGE_SECTION_OBJECT)FileObject->SectionObjectPointer->
ImageSectionObject; ImageSectionObject;
for (i = 0; i < ImageSectionObject->NrSegments; i++) for (i = 0; i < ImageSectionObject->NrSegments; i++)
@ -115,13 +115,13 @@ MmFreeSectionSegments(PFILE_OBJECT FileObject)
MmFreePageTablesSectionSegment(&ImageSectionObject->Segments[i]); MmFreePageTablesSectionSegment(&ImageSectionObject->Segments[i]);
} }
ExFreePool(ImageSectionObject); ExFreePool(ImageSectionObject);
FileObject->SectionObjectPointers->ImageSectionObject = NULL; FileObject->SectionObjectPointer->ImageSectionObject = NULL;
} }
if (FileObject->SectionObjectPointers->DataSectionObject != NULL) if (FileObject->SectionObjectPointer->DataSectionObject != NULL)
{ {
PMM_SECTION_SEGMENT Segment; PMM_SECTION_SEGMENT Segment;
Segment = (PMM_SECTION_SEGMENT)FileObject->SectionObjectPointers-> Segment = (PMM_SECTION_SEGMENT)FileObject->SectionObjectPointer->
DataSectionObject; DataSectionObject;
if (Segment->ReferenceCount != 0) if (Segment->ReferenceCount != 0)
@ -131,7 +131,7 @@ MmFreeSectionSegments(PFILE_OBJECT FileObject)
} }
MmFreePageTablesSectionSegment(Segment); MmFreePageTablesSectionSegment(Segment);
ExFreePool(Segment); ExFreePool(Segment);
FileObject->SectionObjectPointers->DataSectionObject = NULL; FileObject->SectionObjectPointer->DataSectionObject = NULL;
} }
} }
@ -310,7 +310,7 @@ MmUnsharePageEntrySectionSegment(PSECTION_OBJECT Section,
(Offset + PAGE_SIZE <= Segment->RawLength || !IsImageSection)) (Offset + PAGE_SIZE <= Segment->RawLength || !IsImageSection))
{ {
NTSTATUS Status; NTSTATUS Status;
Bcb = FileObject->SectionObjectPointers->SharedCacheMap; Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
Status = CcRosUnmapCacheSegment(Bcb, FileOffset, Dirty); Status = CcRosUnmapCacheSegment(Bcb, FileOffset, Dirty);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
@ -343,7 +343,7 @@ BOOL MiIsPageFromCache(PMEMORY_AREA MemoryArea,
PBCB Bcb; PBCB Bcb;
PCACHE_SEGMENT CacheSeg; PCACHE_SEGMENT CacheSeg;
Bcb = MemoryArea->Data.SectionData.Section->FileObject->SectionObjectPointers->SharedCacheMap; Bcb = MemoryArea->Data.SectionData.Section->FileObject->SectionObjectPointer->SharedCacheMap;
CacheSeg = CcRosLookupCacheSegment(Bcb, SegOffset + MemoryArea->Data.SectionData.Segment->FileOffset); CacheSeg = CcRosLookupCacheSegment(Bcb, SegOffset + MemoryArea->Data.SectionData.Segment->FileOffset);
if (CacheSeg) if (CacheSeg)
{ {
@ -378,7 +378,7 @@ MiReadPage(PMEMORY_AREA MemoryArea,
ULONG Length; ULONG Length;
FileObject = MemoryArea->Data.SectionData.Section->FileObject; FileObject = MemoryArea->Data.SectionData.Section->FileObject;
Bcb = FileObject->SectionObjectPointers->SharedCacheMap; Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
RawLength = MemoryArea->Data.SectionData.Segment->RawLength; RawLength = MemoryArea->Data.SectionData.Segment->RawLength;
FileOffset = SegOffset + MemoryArea->Data.SectionData.Segment->FileOffset; FileOffset = SegOffset + MemoryArea->Data.SectionData.Segment->FileOffset;
IsImageSection = MemoryArea->Data.SectionData.Section->AllocationAttributes & SEC_IMAGE ? TRUE : FALSE; IsImageSection = MemoryArea->Data.SectionData.Section->AllocationAttributes & SEC_IMAGE ? TRUE : FALSE;
@ -1313,7 +1313,7 @@ MmPageOutSectionView(PMADDRESS_SPACE AddressSpace,
DirectMapped = FALSE; DirectMapped = FALSE;
if (FileObject != NULL) if (FileObject != NULL)
{ {
Bcb = FileObject->SectionObjectPointers->SharedCacheMap; Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
/* /*
* If the file system is letting us go directly to the cache and the * If the file system is letting us go directly to the cache and the
@ -1676,7 +1676,7 @@ MmWritePageSectionView(PMADDRESS_SPACE AddressSpace,
DirectMapped = FALSE; DirectMapped = FALSE;
if (FileObject != NULL) if (FileObject != NULL)
{ {
Bcb = FileObject->SectionObjectPointers->SharedCacheMap; Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
/* /*
* If the file system is letting us go directly to the cache and the * If the file system is letting us go directly to the cache and the
@ -2268,11 +2268,11 @@ MmCreateDataFileSection(PHANDLE SectionHandle,
else else
{ {
MaximumSize = MaximumSize =
((PREACTOS_COMMON_FCB_HEADER)FileObject->FsContext)->FileSize; ((PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext)->FileSize;
} }
if (MaximumSize.QuadPart > if (MaximumSize.QuadPart >
((PREACTOS_COMMON_FCB_HEADER)FileObject->FsContext)->FileSize.QuadPart) ((PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext)->FileSize.QuadPart)
{ {
IO_STATUS_BLOCK Iosb; IO_STATUS_BLOCK Iosb;
Status = NtSetInformationFile(FileHandle, Status = NtSetInformationFile(FileHandle,
@ -2309,7 +2309,7 @@ MmCreateDataFileSection(PHANDLE SectionHandle,
* If this file hasn't been mapped as a data file before then allocate a * If this file hasn't been mapped as a data file before then allocate a
* section segment to describe the data file mapping * section segment to describe the data file mapping
*/ */
if (FileObject->SectionObjectPointers->DataSectionObject == NULL) if (FileObject->SectionObjectPointer->DataSectionObject == NULL)
{ {
Segment = ExAllocatePoolWithTag(NonPagedPool, sizeof(MM_SECTION_SEGMENT), Segment = ExAllocatePoolWithTag(NonPagedPool, sizeof(MM_SECTION_SEGMENT),
TAG_MM_SECTION_SEGMENT); TAG_MM_SECTION_SEGMENT);
@ -2342,7 +2342,7 @@ MmCreateDataFileSection(PHANDLE SectionHandle,
ObDereferenceObject(FileObject); ObDereferenceObject(FileObject);
return(Status); return(Status);
} }
FileObject->SectionObjectPointers->DataSectionObject = (PVOID)Segment; FileObject->SectionObjectPointer->DataSectionObject = (PVOID)Segment;
Segment->FileOffset = 0; Segment->FileOffset = 0;
Segment->Protection = 0; Segment->Protection = 0;
@ -2368,7 +2368,7 @@ MmCreateDataFileSection(PHANDLE SectionHandle,
* to extend it * to extend it
*/ */
Segment = Segment =
(PMM_SECTION_SEGMENT)FileObject->SectionObjectPointers-> (PMM_SECTION_SEGMENT)FileObject->SectionObjectPointer->
DataSectionObject; DataSectionObject;
Section->Segments = Segment; Section->Segments = Segment;
InterlockedIncrement((PLONG)&Segment->ReferenceCount); InterlockedIncrement((PLONG)&Segment->ReferenceCount);
@ -2653,7 +2653,7 @@ MmCreateImageSection(PHANDLE SectionHandle,
* section segments to describe the mapping * section segments to describe the mapping
*/ */
NrSegments = PEHeader.FileHeader.NumberOfSections + 1; NrSegments = PEHeader.FileHeader.NumberOfSections + 1;
if (FileObject->SectionObjectPointers->ImageSectionObject == NULL) if (FileObject->SectionObjectPointer->ImageSectionObject == NULL)
{ {
ULONG i; ULONG i;
ULONG Size; ULONG Size;
@ -2758,7 +2758,7 @@ MmCreateImageSection(PHANDLE SectionHandle,
KeInitializeMutex(&SectionSegments[i].Lock, 0); KeInitializeMutex(&SectionSegments[i].Lock, 0);
} }
FileObject->SectionObjectPointers->ImageSectionObject = FileObject->SectionObjectPointer->ImageSectionObject =
(PVOID)ImageSectionObject; (PVOID)ImageSectionObject;
} }
else else
@ -2766,7 +2766,7 @@ MmCreateImageSection(PHANDLE SectionHandle,
ULONG i; ULONG i;
ImageSectionObject = (PMM_IMAGE_SECTION_OBJECT) ImageSectionObject = (PMM_IMAGE_SECTION_OBJECT)
FileObject->SectionObjectPointers->ImageSectionObject; FileObject->SectionObjectPointer->ImageSectionObject;
SectionSegments = ImageSectionObject->Segments; SectionSegments = ImageSectionObject->Segments;
Section->Segments = SectionSegments; Section->Segments = SectionSegments;
@ -3086,7 +3086,7 @@ MmFreeSectionPage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address,
if (PhysAddr.QuadPart == PAGE_FROM_SSE(Entry) && Dirty) if (PhysAddr.QuadPart == PAGE_FROM_SSE(Entry) && Dirty)
{ {
FileObject = MemoryArea->Data.SectionData.Section->FileObject; FileObject = MemoryArea->Data.SectionData.Section->FileObject;
Bcb = FileObject->SectionObjectPointers->SharedCacheMap; Bcb = FileObject->SectionObjectPointer->SharedCacheMap;
CcRosMarkDirtyCacheSegment(Bcb, Offset); CcRosMarkDirtyCacheSegment(Bcb, Offset);
assert(SwapEntry == 0); assert(SwapEntry == 0);
} }