mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +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_EXTENSION DeviceExtension;
|
||||||
PDEVICE_INFORMATION DeviceInformation;
|
PDEVICE_INFORMATION DeviceInformation;
|
||||||
PDEVICE_INTERFACE_CHANGE_NOTIFICATION Notification;
|
PTARGET_DEVICE_CUSTOM_NOTIFICATION Notification;
|
||||||
|
|
||||||
DeviceInformation = Context;
|
DeviceInformation = Context;
|
||||||
DeviceExtension = DeviceInformation->DeviceExtension;
|
DeviceExtension = DeviceInformation->DeviceExtension;
|
||||||
Notification = NotificationStructure;
|
Notification = NotificationStructure;
|
||||||
|
|
||||||
/* If it's to signal that removal is complete, then, execute the function */
|
/* The notification have to be unregistered already (in device interface change handler) */
|
||||||
if (IsEqualGUID(&(Notification->Event), &GUID_TARGET_DEVICE_REMOVE_COMPLETE))
|
ASSERT(!IsEqualGUID(&Notification->Event, &GUID_TARGET_DEVICE_REMOVE_COMPLETE));
|
||||||
{
|
|
||||||
MountMgrMountedDeviceRemoval(DeviceExtension, Notification->SymbolicLinkName);
|
|
||||||
}
|
|
||||||
/* It it's to signal that a volume has been mounted
|
/* It it's to signal that a volume has been mounted
|
||||||
* Verify if a database sync is required and execute it
|
* 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 we were already mounted, then mark us unmounted */
|
||||||
if (InterlockedCompareExchange(&(DeviceInformation->MountState),
|
if (InterlockedCompareExchange(&(DeviceInformation->MountState),
|
||||||
|
|
Loading…
Reference in a new issue