mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
- FS Devices don't need a device queue, optimize the call away.
svn path=/trunk/; revision=17085
This commit is contained in:
parent
6477828cdd
commit
1eb8e4cde0
1 changed files with 14 additions and 1 deletions
|
@ -545,7 +545,20 @@ IoCreateDevice(PDRIVER_OBJECT DriverObject,
|
|||
}
|
||||
|
||||
/* Create the Device Queue */
|
||||
KeInitializeDeviceQueue(&CreatedDeviceObject->DeviceQueue);
|
||||
if (CreatedDeviceObject->DeviceType == FILE_DEVICE_DISK_FILE_SYSTEM ||
|
||||
CreatedDeviceObject->DeviceType == FILE_DEVICE_FILE_SYSTEM ||
|
||||
CreatedDeviceObject->DeviceType == FILE_DEVICE_CD_ROM_FILE_SYSTEM ||
|
||||
CreatedDeviceObject->DeviceType == FILE_DEVICE_NETWORK_FILE_SYSTEM ||
|
||||
CreatedDeviceObject->DeviceType == FILE_DEVICE_TAPE_FILE_SYSTEM)
|
||||
{
|
||||
/* Simple FS Devices, they don't need a real Device Queue */
|
||||
InitializeListHead(&CreatedDeviceObject->Queue.ListEntry);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* An actual Device, initialize its DQ */
|
||||
KeInitializeDeviceQueue(&CreatedDeviceObject->DeviceQueue);
|
||||
}
|
||||
|
||||
/* Insert the Object */
|
||||
Status = ObInsertObject(CreatedDeviceObject,
|
||||
|
|
Loading…
Reference in a new issue