[MOUNTMGR] Fix broken check

Only mark volume mounted if it's not waiting for unloading

CORE-13882
This commit is contained in:
Pierre Schweitzer 2019-09-13 19:55:53 +02:00
parent b804b7fa9e
commit 5c678a76a6
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B

View file

@ -624,9 +624,10 @@ ReconcileThisDatabaseWithMasterWorker(IN PVOID Parameter)
goto ReleaseRDS;
}
if (DeviceObject->Flags & 1)
/* Mark mounted only if not unloading */
if (!(DeviceObject->Flags & DO_UNLOAD_PENDING))
{
_InterlockedExchangeAdd(&ListDeviceInfo->MountState, 1u);
InterlockedExchangeAdd(&ListDeviceInfo->MountState, 1);
}
ObDereferenceObject(FileObject);