mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 17:14:41 +00:00
[MOUNTMGR] Do not handle device removal notification
Do not treat target device change notification as DEVICE_INTERFACE_CHANGE_NOTIFICATION. The notification have to be unregistered while handling GUID_DEVICE_INTERFACE_REMOVAL, so GUID_TARGET_DEVICE_REMOVE_COMPLETE should never be sent to mountmgr in a normal case. CORE-16106
This commit is contained in:
parent
89f36bcfc8
commit
62a4f9d42b
1 changed files with 5 additions and 7 deletions
|
@ -231,21 +231,19 @@ MountMgrTargetDeviceNotification(IN PVOID NotificationStructure,
|
|||
{
|
||||
PDEVICE_EXTENSION DeviceExtension;
|
||||
PDEVICE_INFORMATION DeviceInformation;
|
||||
PDEVICE_INTERFACE_CHANGE_NOTIFICATION Notification;
|
||||
PTARGET_DEVICE_CUSTOM_NOTIFICATION Notification;
|
||||
|
||||
DeviceInformation = Context;
|
||||
DeviceExtension = DeviceInformation->DeviceExtension;
|
||||
Notification = NotificationStructure;
|
||||
|
||||
/* If it's to signal that removal is complete, then, execute the function */
|
||||
if (IsEqualGUID(&(Notification->Event), &GUID_TARGET_DEVICE_REMOVE_COMPLETE))
|
||||
{
|
||||
MountMgrMountedDeviceRemoval(DeviceExtension, Notification->SymbolicLinkName);
|
||||
}
|
||||
/* The notification have to be unregistered already (in device interface change handler) */
|
||||
ASSERT(!IsEqualGUID(&Notification->Event, &GUID_TARGET_DEVICE_REMOVE_COMPLETE));
|
||||
|
||||
/* It it's to signal that a volume has been mounted
|
||||
* Verify if a database sync is required and execute it
|
||||
*/
|
||||
else if (IsEqualGUID(&(Notification->Event), &GUID_IO_VOLUME_MOUNT))
|
||||
if (IsEqualGUID(&(Notification->Event), &GUID_IO_VOLUME_MOUNT))
|
||||
{
|
||||
/* If we were already mounted, then mark us unmounted */
|
||||
if (InterlockedCompareExchange(&(DeviceInformation->MountState),
|
||||
|
|
Loading…
Reference in a new issue