[ros-diffs] [pschweitzer] 49759: [NTOSKRNL] Forgotten comments...

pschweitzer at svn.reactos.org pschweitzer at svn.reactos.org
Tue Nov 23 20:05:34 UTC 2010


Author: pschweitzer
Date: Tue Nov 23 20:05:33 2010
New Revision: 49759

URL: http://svn.reactos.org/svn/reactos?rev=49759&view=rev
Log:
[NTOSKRNL]
Forgotten comments...

Modified:
    trunk/reactos/ntoskrnl/fsrtl/filtrctx.c

Modified: trunk/reactos/ntoskrnl/fsrtl/filtrctx.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/filtrctx.c?rev=49759&r1=49758&r2=49759&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/fsrtl/filtrctx.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/fsrtl/filtrctx.c [iso-8859-1] Tue Nov 23 20:05:33 2010
@@ -187,31 +187,39 @@
         return STATUS_INVALID_DEVICE_REQUEST;
     }
 
+    /* Get filter contexts */
     FOContext = IoGetFileObjectFilterContext(FileObject);
     if (!FOContext)
     {
+        /* If there's none, allocate new structure */
         FOContext = ExAllocatePoolWithTag(NonPagedPool, sizeof(FILE_OBJECT_FILTER_CONTEXTS), 'FOCX');
         if (!FOContext)
         {
             return STATUS_INSUFFICIENT_RESOURCES;
         }
 
+        /* Initialize it */
         ExInitializeFastMutex(&(FOContext->FilterContextsMutex));
         InitializeListHead(&(FOContext->FilterContexts));
 
+        /* Set it */
         if (!IoChangeFileObjectFilterContext(FileObject, FOContext, TRUE))
         {
+            /* If it fails, it means that someone else has set it in the meanwhile */
             ExFreePoolWithTag(FOContext, 'FOCX');
 
+            /* So, we can get it */
             FOContext = IoGetFileObjectFilterContext(FileObject);
             if (!FOContext)
             {
+                /* If we fall down here, something went very bad. This shouldn't happen */
                 ASSERT(FALSE);
                 return STATUS_UNSUCCESSFUL;
             }
         }
     }
 
+    /* Finally, insert */
     ExAcquireFastMutex(&(FOContext->FilterContextsMutex));
     InsertHeadList(&(FOContext->FilterContexts), &(Ptr->Links));
     ExReleaseFastMutex(&(FOContext->FilterContextsMutex));




More information about the Ros-diffs mailing list