Author: dchapyshev Date: Sat Sep 3 19:10:09 2016 New Revision: 72552
URL: http://svn.reactos.org/svn/reactos?rev=72552&view=rev Log: [NTOS:IO] - Add dismount checking (function should behave the same in the fastio and the slow case) - Fix comment
Modified: trunk/reactos/ntoskrnl/io/iomgr/iofunc.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/iofunc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/iofunc.c?... ============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/iofunc.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/iofunc.c [iso-8859-1] Sat Sep 3 19:10:09 2016 @@ -348,7 +348,7 @@ 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; @@ -613,6 +613,12 @@
/* 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,