mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
-use ExAllocatePoolWithTag/ExFreePoolWithTag
-set FileObject to readonly -register the filesystem as low priority svn path=/trunk/; revision=39579
This commit is contained in:
@@ -104,6 +104,8 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
|
||||
CdfsGlobalData->CacheMgrCallbacks.AcquireForReadAhead = CdfsAcquireForLazyWrite;
|
||||
CdfsGlobalData->CacheMgrCallbacks.ReleaseFromReadAhead = CdfsReleaseFromLazyWrite;
|
||||
|
||||
DeviceObject->Flags |= DO_LOW_PRIORITY_FILESYSTEM;
|
||||
|
||||
IoRegisterFileSystem(DeviceObject);
|
||||
DeviceObject->Flags &= ~DO_DEVICE_INITIALIZING;
|
||||
|
||||
|
||||
@@ -68,9 +68,9 @@ CdfsCloseFile(PDEVICE_EXTENSION DeviceExt,
|
||||
|
||||
if (Ccb->DirectorySearchPattern.Buffer)
|
||||
{
|
||||
ExFreePool(Ccb->DirectorySearchPattern.Buffer);
|
||||
ExFreePoolWithTag(Ccb->DirectorySearchPattern.Buffer, TAG_CCB);
|
||||
}
|
||||
ExFreePool(Ccb);
|
||||
ExFreePoolWithTag(Ccb, TAG_CCB);
|
||||
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -590,7 +590,7 @@ CdfsQueryDirectory(PDEVICE_OBJECT DeviceObject,
|
||||
{
|
||||
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 @@ CdfsQueryDirectory(PDEVICE_OBJECT DeviceObject,
|
||||
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;
|
||||
|
||||
@@ -246,6 +246,9 @@ CdfsFCBInitializeCache(PVCB Vcb,
|
||||
RtlZeroMemory(newCCB,
|
||||
sizeof(CCB));
|
||||
|
||||
FileObject->ReadAccess = TRUE;
|
||||
FileObject->WriteAccess = FALSE;
|
||||
FileObject->DeleteAccess = FALSE;
|
||||
FileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
|
||||
FileObject->FsContext = Fcb;
|
||||
FileObject->FsContext2 = newCCB;
|
||||
|
||||
@@ -385,6 +385,9 @@ CdfsMountVolume(PDEVICE_OBJECT DeviceObject,
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user