mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
[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:
parent
d94cfe79f5
commit
f77ed4dcd6
1 changed files with 7 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue