sys: major change in device management: introduce FspDeviceGlobalLock and remove FSP_FSVOL_DEVICE_EXTENSION::DeleteResource; makes locking coarse-grained but more generic and safe

This commit is contained in:
Bill Zissimopoulos
2016-04-18 13:48:50 -07:00
parent 6dd6ec6b47
commit c40ce93fe2
4 changed files with 63 additions and 33 deletions

View File

@ -36,6 +36,7 @@ NTSTATUS DriverEntry(
FspDriverMultiVersionInitialize();
FspDriverObject = DriverObject;
ExInitializeResourceLite(&FspDeviceGlobalResource);
/* create the file system control device objects */
UNICODE_STRING DeviceSddl;
@ -182,8 +183,9 @@ VOID FspUnload(
FspFsctlDiskDeviceObject = 0;
FspFsctlNetDeviceObject = 0;
FspDeviceDeleteAll();
//FspDeviceDeleteAll();
ExDeleteResourceLite(&FspDeviceGlobalResource);
FspDriverObject = 0;
#pragma prefast(suppress:28175, "We are in DriverUnload: ok to access DriverName")