mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 19:26:33 +00:00
[NTFS]
Use non-paged lookaside list for IRP context allocation svn path=/trunk/; revision=67883
This commit is contained in:
@@ -117,7 +117,7 @@ NtfsDispatch(PNTFS_IRP_CONTEXT IrpContext)
|
||||
}
|
||||
else
|
||||
{
|
||||
ExFreePoolWithTag(IrpContext, 'PRIN');
|
||||
ExFreeToNPagedLookasideList(&NtfsGlobalData->IrpContextLookasideList, IrpContext);
|
||||
}
|
||||
|
||||
IoSetTopLevelIrp(NULL);
|
||||
|
||||
@@ -70,9 +70,7 @@ NtfsAllocateIrpContext(PDEVICE_OBJECT DeviceObject,
|
||||
|
||||
TRACE_(NTFS, "NtfsAllocateIrpContext()\n");
|
||||
|
||||
IrpContext = (PNTFS_IRP_CONTEXT)ExAllocatePoolWithTag(NonPagedPool,
|
||||
sizeof(NTFS_IRP_CONTEXT),
|
||||
'PRIN');
|
||||
IrpContext = (PNTFS_IRP_CONTEXT)ExAllocateFromNPagedLookasideList(&NtfsGlobalData->IrpContextLookasideList);
|
||||
if (IrpContext == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -96,6 +96,10 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
|
||||
NtfsGlobalData->FastIoDispatch.FastIoWrite = NtfsFastIoWrite;
|
||||
DriverObject->FastIoDispatch = &NtfsGlobalData->FastIoDispatch;
|
||||
|
||||
/* Initialize lookaside list for IRP contexts */
|
||||
ExInitializeNPagedLookasideList(&NtfsGlobalData->IrpContextLookasideList,
|
||||
NULL, NULL, 0, sizeof(NTFS_IRP_CONTEXT), 'PRIN', 0);
|
||||
|
||||
/* Driver can't be unloaded */
|
||||
DriverObject->DriverUnload = NULL;
|
||||
|
||||
|
||||
@@ -137,6 +137,7 @@ typedef struct
|
||||
CACHE_MANAGER_CALLBACKS CacheMgrCallbacks;
|
||||
ULONG Flags;
|
||||
FAST_IO_DISPATCH FastIoDispatch;
|
||||
NPAGED_LOOKASIDE_LIST IrpContextLookasideList;
|
||||
} NTFS_GLOBAL_DATA, *PNTFS_GLOBAL_DATA;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user