Author: hbelusca Date: Sat Sep 3 22:07:53 2016 New Revision: 72556
URL: http://svn.reactos.org/svn/reactos?rev=72556&view=rev Log: [NTOS]: Fix comments & increase code readability by directly using InterlockedIncrement.
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 22:07:53 2016 @@ -384,10 +384,10 @@ _SEH2_END; }
- /* If we're to dismount a volume, increaase the dismount count */ + /* If we are dismounting a volume, increaase the dismount count */ if (IoControlCode == FSCTL_DISMOUNT_VOLUME) { - InterlockedExchangeAdd((PLONG)&SharedUserData->DismountCount, 1); + InterlockedIncrement((PLONG)&SharedUserData->DismountCount); }
/* Call the FSD */ @@ -418,7 +418,7 @@ /* Backup our complete context in case it exists */ if (FileObject->CompletionContext) { - CompletionInfo = *(FileObject->CompletionContext); + CompletionInfo = *(FileObject->CompletionContext); }
/* If we had an event, signal it */ @@ -612,12 +612,15 @@ }
/* 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 (!IsDevIoCtl) + { + Irp->Flags |= IRP_DEFER_IO_COMPLETION; + } + + /* If we are dismounting a volume, increaase the dismount count */ if (IoControlCode == FSCTL_DISMOUNT_VOLUME) { - InterlockedExchangeAdd((PLONG)&SharedUserData->DismountCount, 1); + InterlockedIncrement((PLONG)&SharedUserData->DismountCount); }
/* Perform the call */