Author: cwittich
Date: Fri Feb 13 05:48:06 2009
New Revision: 39579
URL:
http://svn.reactos.org/svn/reactos?rev=39579&view=rev
Log:
-use ExAllocatePoolWithTag/ExFreePoolWithTag
-set FileObject to readonly
-register the filesystem as low priority
Modified:
trunk/reactos/drivers/filesystems/cdfs/cdfs.c
trunk/reactos/drivers/filesystems/cdfs/close.c
trunk/reactos/drivers/filesystems/cdfs/dirctl.c
trunk/reactos/drivers/filesystems/cdfs/fcb.c
trunk/reactos/drivers/filesystems/cdfs/fsctl.c
Modified: trunk/reactos/drivers/filesystems/cdfs/cdfs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/c…
==============================================================================
--- trunk/reactos/drivers/filesystems/cdfs/cdfs.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/cdfs/cdfs.c [iso-8859-1] Fri Feb 13 05:48:06 2009
@@ -104,6 +104,8 @@
CdfsGlobalData->CacheMgrCallbacks.AcquireForReadAhead = CdfsAcquireForLazyWrite;
CdfsGlobalData->CacheMgrCallbacks.ReleaseFromReadAhead =
CdfsReleaseFromLazyWrite;
+ DeviceObject->Flags |= DO_LOW_PRIORITY_FILESYSTEM;
+
IoRegisterFileSystem(DeviceObject);
DeviceObject->Flags &= ~DO_DEVICE_INITIALIZING;
Modified: trunk/reactos/drivers/filesystems/cdfs/close.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/c…
==============================================================================
--- trunk/reactos/drivers/filesystems/cdfs/close.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/cdfs/close.c [iso-8859-1] Fri Feb 13 05:48:06 2009
@@ -68,9 +68,9 @@
if (Ccb->DirectorySearchPattern.Buffer)
{
- ExFreePool(Ccb->DirectorySearchPattern.Buffer);
+ ExFreePoolWithTag(Ccb->DirectorySearchPattern.Buffer, TAG_CCB);
}
- ExFreePool(Ccb);
+ ExFreePoolWithTag(Ccb, TAG_CCB);
return(STATUS_SUCCESS);
}
Modified: trunk/reactos/drivers/filesystems/cdfs/dirctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/d…
==============================================================================
--- trunk/reactos/drivers/filesystems/cdfs/dirctl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/cdfs/dirctl.c [iso-8859-1] Fri Feb 13 05:48:06 2009
@@ -590,7 +590,7 @@
{
First = TRUE;
Ccb->DirectorySearchPattern.Buffer =
- ExAllocatePool(NonPagedPool, SearchPattern->Length + sizeof(WCHAR));
+ ExAllocatePoolWithTag(NonPagedPool, SearchPattern->Length +
sizeof(WCHAR), TAG_CCB);
if (Ccb->DirectorySearchPattern.Buffer == NULL)
{
return STATUS_INSUFFICIENT_RESOURCES;
@@ -608,7 +608,7 @@
else if (Ccb->DirectorySearchPattern.Buffer == NULL)
{
First = TRUE;
- Ccb->DirectorySearchPattern.Buffer = ExAllocatePool(NonPagedPool, 2 *
sizeof(WCHAR));
+ Ccb->DirectorySearchPattern.Buffer = ExAllocatePoolWithTag(NonPagedPool, 2 *
sizeof(WCHAR), TAG_CCB);
if (Ccb->DirectorySearchPattern.Buffer == NULL)
{
return STATUS_INSUFFICIENT_RESOURCES;
Modified: trunk/reactos/drivers/filesystems/cdfs/fcb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/cdfs/fcb.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/cdfs/fcb.c [iso-8859-1] Fri Feb 13 05:48:06 2009
@@ -246,6 +246,9 @@
RtlZeroMemory(newCCB,
sizeof(CCB));
+ FileObject->ReadAccess = TRUE;
+ FileObject->WriteAccess = FALSE;
+ FileObject->DeleteAccess = FALSE;
FileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
FileObject->FsContext = Fcb;
FileObject->FsContext2 = newCCB;
Modified: trunk/reactos/drivers/filesystems/cdfs/fsctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/cdfs/fsctl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/cdfs/fsctl.c [iso-8859-1] Fri Feb 13 05:48:06 2009
@@ -385,6 +385,9 @@
RtlZeroMemory(Ccb,
sizeof(CCB));
+ DeviceExt->StreamFileObject->ReadAccess = TRUE;
+ DeviceExt->StreamFileObject->WriteAccess = FALSE;
+ DeviceExt->StreamFileObject->DeleteAccess = FALSE;
DeviceExt->StreamFileObject->FsContext = Fcb;
DeviceExt->StreamFileObject->FsContext2 = Ccb;
DeviceExt->StreamFileObject->SectionObjectPointer =
&Fcb->SectionObjectPointers;