[NTOSKRNL] In case IopMountVolume call is a success, return its VPB

This fixes an extra (erroneous) reference being set on the VPB.

Based on a patch by Vadim Galyant

CORE-16080
This commit is contained in:
Pierre Schweitzer 2019-06-02 10:48:35 +02:00
parent f8a4d31da4
commit 9c3c0d123b
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B

View file

@ -123,6 +123,14 @@ IopCheckVpbMounted(IN POPEN_PACKET OpenPacket,
*Status = STATUS_WRONG_VOLUME;
return NULL;
}
/*
* In case IopMountVolume returns a valid VPB
* Then, the volume is mounted, return it
*/
else if (Vpb != NULL)
{
return Vpb;
}
/* Re-acquire the lock */
IoAcquireVpbSpinLock(&OldIrql);