diff --git a/ntoskrnl/io/iomgr/volume.c b/ntoskrnl/io/iomgr/volume.c index 1d1e31e5c0..80b2d6835f 100644 --- a/ntoskrnl/io/iomgr/volume.c +++ b/ntoskrnl/io/iomgr/volume.c @@ -129,6 +129,14 @@ IopCheckVpbMounted(IN POPEN_PACKET OpenPacket, */ else if (Vpb != NULL) { + if (Vpb->Flags & VPB_LOCKED) + { + /* We're locked, so fail */ + *Status = STATUS_ACCESS_DENIED; + return NULL; + } + + Vpb->ReferenceCount++; return Vpb; }