[NTOS:IO]

- Add dismount checking (function should behave the same in the fastio and the slow case)
- Fix comment

svn path=/trunk/; revision=72552
This commit is contained in:
Dmitry Chapyshev 2016-09-03 19:10:09 +00:00
parent d94cfe79f5
commit f77ed4dcd6

View file

@ -348,7 +348,7 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle,
DeviceObject = IoGetRelatedDeviceObject(FileObject);
}
/* If that's FS I/O, try to do it with FastIO path */
/* If this is a device I/O, try to do it with FastIO path */
if (IsDevIoCtl)
{
PFAST_IO_DISPATCH FastIoDispatch = DeviceObject->DriverObject->FastIoDispatch;
@ -614,6 +614,12 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle,
/* Use deferred completion for FS I/O */
Irp->Flags |= (!IsDevIoCtl) ? IRP_DEFER_IO_COMPLETION : 0;
/* If we're to dismount a volume, increaase the dismount count */
if (IoControlCode == FSCTL_DISMOUNT_VOLUME)
{
InterlockedExchangeAdd((PLONG)&SharedUserData->DismountCount, 1);
}
/* Perform the call */
return IopPerformSynchronousRequest(DeviceObject,
Irp,