[STORPORT] Fix x64 build
[reactos.git] / ntoskrnl / fsrtl / notify.c
index 9c2a420..73f6e48 100644 (file)
@@ -85,7 +85,7 @@ FsRtlCancelNotify(IN PDEVICE_OBJECT DeviceObject,
     PIO_STACK_LOCATION Stack;
     PNOTIFY_CHANGE NotifyChange;
     PREAL_NOTIFY_SYNC RealNotifySync;
-    PSECURITY_SUBJECT_CONTEXT SubjectContext = NULL;
+    PSECURITY_SUBJECT_CONTEXT _SEH2_VOLATILE SubjectContext = NULL;
 
     /* Get the NOTIFY_CHANGE struct and reset it */
     NotifyChange = (PNOTIFY_CHANGE)Irp->IoStatus.Information;
@@ -166,7 +166,7 @@ FsRtlCancelNotify(IN PDEVICE_OBJECT DeviceObject,
                if (Buffer == NULL)
                {
                    PsChargePoolQuota(NotifyChange->OwningProcess, PagedPool, BufferLength);
-                   Buffer = ExAllocatePoolWithTag(PagedPool | POOL_RAISE_IF_ALLOCATION_FAILURE, BufferLength, 'NrSF');
+                   Buffer = ExAllocatePoolWithTag(PagedPool | POOL_RAISE_IF_ALLOCATION_FAILURE, BufferLength, TAG_FS_NOTIFICATIONS);
                    NotifyChange->AllocatedBuffer = Buffer;
                }
 
@@ -191,7 +191,7 @@ FsRtlCancelNotify(IN PDEVICE_OBJECT DeviceObject,
 
        /* Set appropriate status and complete */
        Irp->IoStatus.Status = STATUS_CANCELLED;
-       IofCompleteRequest(Irp, EVENT_INCREMENT);
+       IoCompleteRequest(Irp, IO_DISK_INCREMENT);
 
        /* If that notification isn't referenced any longer, drop it */
        if (!InterlockedDecrement((PLONG)&(NotifyChange->ReferenceCount)))
@@ -200,7 +200,7 @@ FsRtlCancelNotify(IN PDEVICE_OBJECT DeviceObject,
            if (NotifyChange->AllocatedBuffer)
            {
                PsReturnProcessPagedPoolQuota(NotifyChange->OwningProcess, NotifyChange->ThisBufferLength);
-               ExFreePoolWithTag(NotifyChange->AllocatedBuffer, 'NrSF');
+               ExFreePoolWithTag(NotifyChange->AllocatedBuffer, TAG_FS_NOTIFICATIONS);
            }
 
            /* In case of full name, remember subject context for later deletion */
@@ -384,7 +384,7 @@ ReleaseAndComplete:
 Completion:
     IoMarkIrpPending(Irp);
     Irp->IoStatus.Status = Status;
-    IoCompleteRequest(Irp, EVENT_INCREMENT);
+    IoCompleteRequest(Irp, IO_DISK_INCREMENT);
 }
 
 /*
@@ -559,7 +559,7 @@ FsRtlNotifyUpdateBuffer(OUT PFILE_NOTIFY_INFORMATION OutputBuffer,
  * @implemented
  *
  * Lets FSD know if changes occures in the specified directory.
- * Directory will be reenumerated. 
+ * Directory will be reenumerated.
  *
  * @param NotifySync
  *        Synchronization object pointer
@@ -568,7 +568,7 @@ FsRtlNotifyUpdateBuffer(OUT PFILE_NOTIFY_INFORMATION OutputBuffer,
  *        Used to identify the notify structure
  *
  * @param FullDirectoryName
- *        String (A or W) containing the full directory name 
+ *        String (A or W) containing the full directory name
  *
  * @param NotifyList
  *        Notify list pointer (to head)
@@ -620,7 +620,7 @@ FsRtlNotifyChangeDirectory(IN PNOTIFY_SYNC NotifySync,
  *        Synchronization object pointer
  *
  * @param NotifyList
- *        Notify list pointer (to head) 
+ *        Notify list pointer (to head)
  *
  * @param FsContext
  *        Used to identify the notify structure
@@ -638,7 +638,7 @@ FsRtlNotifyCleanup(IN PNOTIFY_SYNC NotifySync,
 {
     PNOTIFY_CHANGE NotifyChange;
     PREAL_NOTIFY_SYNC RealNotifySync;
-    PSECURITY_SUBJECT_CONTEXT SubjectContext = NULL;
+    PSECURITY_SUBJECT_CONTEXT _SEH2_VOLATILE SubjectContext = NULL;
 
     /* Get real structure hidden behind the opaque pointer */
     RealNotifySync = (PREAL_NOTIFY_SYNC)NotifySync;
@@ -794,7 +794,7 @@ FsRtlNotifyFilterChangeDirectory(IN PNOTIFY_SYNC NotifySync,
         {
             IoMarkIrpPending(NotifyIrp);
             NotifyIrp->IoStatus.Status = STATUS_NOTIFY_CLEANUP;
-            IoCompleteRequest(NotifyIrp, EVENT_INCREMENT);
+            IoCompleteRequest(NotifyIrp, IO_DISK_INCREMENT);
             _SEH2_LEAVE;
         }
 
@@ -807,14 +807,14 @@ FsRtlNotifyFilterChangeDirectory(IN PNOTIFY_SYNC NotifySync,
             {
                 IoMarkIrpPending(NotifyIrp);
                 NotifyIrp->IoStatus.Status = STATUS_NOTIFY_CLEANUP;
-                IoCompleteRequest(NotifyIrp, EVENT_INCREMENT);
+                IoCompleteRequest(NotifyIrp, IO_DISK_INCREMENT);
             }
             /* Or if it's about to be deleted, complete */
             else if (NotifyChange->Flags & DELETE_IN_PROCESS)
             {
                 IoMarkIrpPending(NotifyIrp);
                 NotifyIrp->IoStatus.Status = STATUS_DELETE_PENDING;
-                IoCompleteRequest(NotifyIrp, EVENT_INCREMENT);
+                IoCompleteRequest(NotifyIrp, IO_DISK_INCREMENT);
             }
             /* Complete now if asked to (and not asked to notify later on) */
             if ((NotifyChange->Flags & NOTIFY_IMMEDIATELY) && !(NotifyChange->Flags & NOTIFY_LATER))
@@ -822,7 +822,7 @@ FsRtlNotifyFilterChangeDirectory(IN PNOTIFY_SYNC NotifySync,
                 NotifyChange->Flags &= ~NOTIFY_IMMEDIATELY;
                 IoMarkIrpPending(NotifyIrp);
                 NotifyIrp->IoStatus.Status = STATUS_NOTIFY_ENUM_DIR;
-                IoCompleteRequest(NotifyIrp, EVENT_INCREMENT);
+                IoCompleteRequest(NotifyIrp, IO_DISK_INCREMENT);
             }
             /* If no data yet, or asked to notify later on, handle */
             else if (NotifyChange->DataLength == 0 || (NotifyChange->Flags & NOTIFY_LATER))
@@ -1328,7 +1328,7 @@ FsRtlNotifyFilterReportChange(IN PNOTIFY_SYNC NotifySync,
                                 PsChargePoolQuota(NotifyChange->OwningProcess, PagedPool, NumberOfBytes);
                                 PoolQuotaCharged = TRUE;
                                 OutputBuffer = ExAllocatePoolWithTag(PagedPool | POOL_RAISE_IF_ALLOCATION_FAILURE,
-                                                                     NumberOfBytes, 'NrSF');
+                                                                     NumberOfBytes, TAG_FS_NOTIFICATIONS);
                                 NotifyChange->Buffer = OutputBuffer;
                                 NotifyChange->AllocatedBuffer = OutputBuffer;
                             }
@@ -1337,7 +1337,7 @@ FsRtlNotifyFilterReportChange(IN PNOTIFY_SYNC NotifySync,
                             {
                                 if (PoolQuotaCharged)
                                 {
-                                    PsReturnProcessPagedPoolQuota(NotifyChange->OwningProcess, NumberOfBytes); 
+                                    PsReturnProcessPagedPoolQuota(NotifyChange->OwningProcess, NumberOfBytes);
                                 }
                                 NotifyChange->Flags |= NOTIFY_IMMEDIATELY;
                             }
@@ -1371,7 +1371,7 @@ FsRtlNotifyFilterReportChange(IN PNOTIFY_SYNC NotifySync,
                             if (NotifyChange->AllocatedBuffer != NULL)
                             {
                                 PsReturnProcessPagedPoolQuota(NotifyChange->OwningProcess, NotifyChange->ThisBufferLength);
-                                ExFreePoolWithTag(NotifyChange->AllocatedBuffer, 'NrSF');
+                                ExFreePoolWithTag(NotifyChange->AllocatedBuffer, TAG_FS_NOTIFICATIONS);
                             }
 
                             NotifyChange->Buffer = NULL;
@@ -1413,19 +1413,19 @@ FsRtlNotifyFilterReportChange(IN PNOTIFY_SYNC NotifySync,
  * @name FsRtlNotifyFullChangeDirectory
  * @implemented
  *
- * Lets FSD know if changes occures in the specified directory. 
+ * Lets FSD know if changes occures in the specified directory.
  *
  * @param NotifySync
  *        Synchronization object pointer
  *
  * @param NotifyList
- *        Notify list pointer (to head) 
+ *        Notify list pointer (to head)
  *
  * @param FsContext
  *        Used to identify the notify structure
  *
  * @param FullDirectoryName
- *        String (A or W) containing the full directory name 
+ *        String (A or W) containing the full directory name
  *
  * @param WatchTree
  *        True to notify changes in subdirectories too
@@ -1489,13 +1489,13 @@ FsRtlNotifyFullChangeDirectory(IN PNOTIFY_SYNC NotifySync,
  *        Synchronization object pointer
  *
  * @param NotifyList
- *        Notify list pointer (to head) 
+ *        Notify list pointer (to head)
  *
  * @param FullTargetName
  *        String (A or W) containing the full directory name that changed
  *
  * @param TargetNameOffset
- *        Offset, in FullTargetName, of the final component that is in the changed directory 
+ *        Offset, in FullTargetName, of the final component that is in the changed directory
  *
  * @param StreamName
  *        String (A or W) containing a stream name
@@ -1563,7 +1563,7 @@ FsRtlNotifyInitializeSync(IN PNOTIFY_SYNC *NotifySync)
     PREAL_NOTIFY_SYNC RealNotifySync;
 
     *NotifySync = NULL;
-    
+
     RealNotifySync = ExAllocatePoolWithTag(NonPagedPool | POOL_RAISE_IF_ALLOCATION_FAILURE,
                                            sizeof(REAL_NOTIFY_SYNC), 'FSNS');
     ExInitializeFastMutex(&(RealNotifySync->FastMutex));
@@ -1583,7 +1583,7 @@ FsRtlNotifyInitializeSync(IN PNOTIFY_SYNC *NotifySync)
  *        Synchronization object pointer
  *
  * @param NotifyList
- *        Notify list pointer (to head) 
+ *        Notify list pointer (to head)
  *
  * @param FullTargetName
  *        String (A or W) containing the full directory name that changed
@@ -1616,7 +1616,7 @@ FsRtlNotifyReportChange(IN PNOTIFY_SYNC NotifySync,
                                     FilterMatch,
                                     0,
                                     NULL,
-                                    NULL); 
+                                    NULL);
 }
 
 /*++