https://git.reactos.org/?p=reactos.git;a=commitdiff;h=02cff5abc15e39a49a8b2eef95e794bc616d1cb4

commit 02cff5abc15e39a49a8b2eef95e794bc616d1cb4
Author:     Hermès Bélusca-Maïto <hermes.belusca-ma...@reactos.org>
AuthorDate: Tue Jun 4 17:19:29 2024 +0200
Commit:     Hermès Bélusca-Maïto <hermes.belusca-ma...@reactos.org>
CommitDate: Sun Jan 5 21:09:08 2025 +0100

    [NTOS:IO] tag.h: Remove duplicated TAG_SYSB/TAG_SYS_BUF and rename it to 
TAG_IOBUF
---
 ntoskrnl/include/internal/tag.h |  4 +---
 ntoskrnl/io/iomgr/iofunc.c      | 32 ++++++++++++++++----------------
 ntoskrnl/io/iomgr/irp.c         |  8 ++++----
 3 files changed, 21 insertions(+), 23 deletions(-)

diff --git a/ntoskrnl/include/internal/tag.h b/ntoskrnl/include/internal/tag.h
index 35cf14d6ae6..4292f4b439d 100644
--- a/ntoskrnl/include/internal/tag.h
+++ b/ntoskrnl/include/internal/tag.h
@@ -59,7 +59,6 @@
 #define TAG_IO_TIMER            'MTOI'
 #define TAG_DRIVER              'RVRD'
 #define TAG_DRIVER_EXTENSION    'EVRD'
-#define TAG_SYSB                'BSYS'
 #define TAG_LOCK                'kclF'
 #define TAG_FILE_NAME           'MANF'
 #define TAG_FILE_SYSTEM         'SYSF'
@@ -84,7 +83,7 @@
 #define TAG_REINIT              'iRoI'
 #define TAG_IOWI                'IWOI'
 #define TAG_IRP                 ' prI'
-#define TAG_SYS_BUF             'BSYS'
+#define TAG_IOBUF               'UBOI'
 #define TAG_KINTERRUPT          'RSIK'
 #define TAG_MDL                 ' LDM'
 #define TAG_IO_DEVNODE          'donD'
@@ -93,7 +92,6 @@
 #define TAG_IO_RESOURCE         'CRSR'
 #define TAG_IO_TIMER            'MTOI'
 #define TAG_VPB                 ' BPV'
-#define TAG_SYSB                'BSYS'
 #define TAG_RTLREGISTRY         'vrqR'
 #define TAG_PNP_DEVACTION       'aDpP'
 
diff --git a/ntoskrnl/io/iomgr/iofunc.c b/ntoskrnl/io/iomgr/iofunc.c
index f672f4b5af6..3c0cf9b69e2 100644
--- a/ntoskrnl/io/iomgr/iofunc.c
+++ b/ntoskrnl/io/iomgr/iofunc.c
@@ -529,7 +529,7 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle,
                     Irp->AssociatedIrp.SystemBuffer =
                         ExAllocatePoolWithQuotaTag(PoolType,
                                                    BufferLength,
-                                                   TAG_SYS_BUF);
+                                                   TAG_IOBUF);
 
                     /* Check if we got a buffer */
                     if (InputBuffer)
@@ -576,7 +576,7 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle,
                     Irp->AssociatedIrp.SystemBuffer =
                         ExAllocatePoolWithQuotaTag(PoolType,
                                                    InputBufferLength,
-                                                   TAG_SYS_BUF);
+                                                   TAG_IOBUF);
 
                     /* Copy into the System Buffer */
                     RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer,
@@ -2047,7 +2047,7 @@ NtQueryDirectoryFile(IN HANDLE FileHandle,
                 AuxBuffer = ExAllocatePoolWithTag(NonPagedPool,
                                                   CapturedFileName.Length +
                                                   sizeof(UNICODE_STRING),
-                                                  TAG_SYSB);
+                                                  TAG_IOBUF);
                 RtlCopyMemory((PVOID)((ULONG_PTR)AuxBuffer +
                                       sizeof(UNICODE_STRING)),
                               CapturedFileName.Buffer,
@@ -2064,7 +2064,7 @@ NtQueryDirectoryFile(IN HANDLE FileHandle,
         _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
         {
             /* Free buffer and return the exception code */
-            if (AuxBuffer) ExFreePoolWithTag(AuxBuffer, TAG_SYSB);
+            if (AuxBuffer) ExFreePoolWithTag(AuxBuffer, TAG_IOBUF);
             _SEH2_YIELD(return _SEH2_GetExceptionCode());
         }
         _SEH2_END;
@@ -2100,7 +2100,7 @@ NtQueryDirectoryFile(IN HANDLE FileHandle,
     if (!NT_SUCCESS(Status))
     {
         /* Fail */
-        if (AuxBuffer) ExFreePoolWithTag(AuxBuffer, TAG_SYSB);
+        if (AuxBuffer) ExFreePoolWithTag(AuxBuffer, TAG_IOBUF);
         return Status;
     }
 
@@ -2108,7 +2108,7 @@ NtQueryDirectoryFile(IN HANDLE FileHandle,
     if (FileObject->CompletionContext != NULL && ApcRoutine != NULL)
     {
         ObDereferenceObject(FileObject);
-        if (AuxBuffer) ExFreePoolWithTag(AuxBuffer, TAG_SYSB);
+        if (AuxBuffer) ExFreePoolWithTag(AuxBuffer, TAG_IOBUF);
         return STATUS_INVALID_PARAMETER;
     }
 
@@ -2125,7 +2125,7 @@ NtQueryDirectoryFile(IN HANDLE FileHandle,
         if (!NT_SUCCESS(Status))
         {
             /* Fail */
-            if (AuxBuffer) ExFreePoolWithTag(AuxBuffer, TAG_SYSB);
+            if (AuxBuffer) ExFreePoolWithTag(AuxBuffer, TAG_IOBUF);
             ObDereferenceObject(FileObject);
             return Status;
         }
@@ -2143,7 +2143,7 @@ NtQueryDirectoryFile(IN HANDLE FileHandle,
         {
             if (Event) ObDereferenceObject(Event);
             ObDereferenceObject(FileObject);
-            if (AuxBuffer) ExFreePoolWithTag(AuxBuffer, TAG_SYSB);
+            if (AuxBuffer) ExFreePoolWithTag(AuxBuffer, TAG_IOBUF);
             return Status;
         }
 
@@ -2181,13 +2181,13 @@ NtQueryDirectoryFile(IN HANDLE FileHandle,
         {
             /* Allocate a buffer */
             Irp->AssociatedIrp.SystemBuffer =
-                ExAllocatePoolWithQuotaTag(NonPagedPool, Length, TAG_SYSB);
+                ExAllocatePoolWithQuotaTag(NonPagedPool, Length, TAG_IOBUF);
         }
         _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
         {
             /* Allocating failed, clean up and return the exception code */
             IopCleanupAfterException(FileObject, Irp, Event, NULL);
-            if (AuxBuffer) ExFreePoolWithTag(AuxBuffer, TAG_SYSB);
+            if (AuxBuffer) ExFreePoolWithTag(AuxBuffer, TAG_IOBUF);
 
             /* Return the exception code */
             return _SEH2_GetExceptionCode();
@@ -2517,7 +2517,7 @@ NtQueryInformationFile(IN HANDLE FileHandle,
     {
         /* Allocate a buffer */
         Irp->AssociatedIrp.SystemBuffer =
-            ExAllocatePoolWithQuotaTag(NonPagedPool, Length, TAG_SYSB);
+            ExAllocatePoolWithQuotaTag(NonPagedPool, Length, TAG_IOBUF);
     }
     _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
     {
@@ -2985,7 +2985,7 @@ NtReadFile(IN HANDLE FileHandle,
             {
                 /* Allocate a buffer */
                 Irp->AssociatedIrp.SystemBuffer =
-                    ExAllocatePoolWithQuotaTag(NonPagedPool, Length, TAG_SYSB);
+                    ExAllocatePoolWithQuotaTag(NonPagedPool, Length, 
TAG_IOBUF);
             }
             _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
             {
@@ -3286,7 +3286,7 @@ NtSetInformationFile(IN HANDLE FileHandle,
     {
         /* Allocate a buffer */
         Irp->AssociatedIrp.SystemBuffer =
-            ExAllocatePoolWithQuotaTag(NonPagedPool, Length, TAG_SYSB);
+            ExAllocatePoolWithQuotaTag(NonPagedPool, Length, TAG_IOBUF);
 
         /* Copy the data into it */
         RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer,
@@ -4058,7 +4058,7 @@ NtWriteFile(IN HANDLE FileHandle,
             {
                 /* Allocate a buffer */
                 Irp->AssociatedIrp.SystemBuffer =
-                    ExAllocatePoolWithQuotaTag(NonPagedPool, Length, TAG_SYSB);
+                    ExAllocatePoolWithQuotaTag(NonPagedPool, Length, 
TAG_IOBUF);
 
                 /* Copy the data into it */
                 RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer, Buffer, Length);
@@ -4385,7 +4385,7 @@ NtQueryVolumeInformationFile(IN HANDLE FileHandle,
     {
         /* Allocate a buffer */
         Irp->AssociatedIrp.SystemBuffer =
-            ExAllocatePoolWithQuotaTag(NonPagedPool, Length, TAG_SYSB);
+            ExAllocatePoolWithQuotaTag(NonPagedPool, Length, TAG_IOBUF);
     }
     _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
     {
@@ -4566,7 +4566,7 @@ NtSetVolumeInformationFile(IN HANDLE FileHandle,
     {
         /* Allocate a buffer */
         Irp->AssociatedIrp.SystemBuffer =
-            ExAllocatePoolWithQuotaTag(NonPagedPool, Length, TAG_SYSB);
+            ExAllocatePoolWithQuotaTag(NonPagedPool, Length, TAG_IOBUF);
 
         /* Copy the data into it */
         RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer, FsInformation, Length);
diff --git a/ntoskrnl/io/iomgr/irp.c b/ntoskrnl/io/iomgr/irp.c
index 2de843975e0..c6316c83f7f 100644
--- a/ntoskrnl/io/iomgr/irp.c
+++ b/ntoskrnl/io/iomgr/irp.c
@@ -210,7 +210,7 @@ IopCleanupIrp(IN PIRP Irp,
     if (Irp->Flags & IRP_DEALLOCATE_BUFFER)
     {
         /* Free the buffer */
-        ExFreePoolWithTag(Irp->AssociatedIrp.SystemBuffer, TAG_SYS_BUF);
+        ExFreePoolWithTag(Irp->AssociatedIrp.SystemBuffer, TAG_IOBUF);
     }
 
     /* Check if this IRP has a user event, a file object, and is async */
@@ -778,7 +778,7 @@ IoBuildAsynchronousFsdRequest(IN ULONG MajorFunction,
         {
             /* Allocate the System Buffer */
             Irp->AssociatedIrp.SystemBuffer =
-                ExAllocatePoolWithTag(NonPagedPool, Length, TAG_SYS_BUF);
+                ExAllocatePoolWithTag(NonPagedPool, Length, TAG_IOBUF);
             if (!Irp->AssociatedIrp.SystemBuffer)
             {
                 /* Free the IRP and fail */
@@ -927,7 +927,7 @@ IoBuildDeviceIoControlRequest(IN ULONG IoControlCode,
                 Irp->AssociatedIrp.SystemBuffer =
                     ExAllocatePoolWithTag(NonPagedPool,
                                           BufferLength,
-                                          TAG_SYS_BUF);
+                                          TAG_IOBUF);
                 if (!Irp->AssociatedIrp.SystemBuffer)
                 {
                     /* Free the IRP and fail */
@@ -970,7 +970,7 @@ IoBuildDeviceIoControlRequest(IN ULONG IoControlCode,
                 Irp->AssociatedIrp.SystemBuffer =
                     ExAllocatePoolWithTag(NonPagedPool,
                                           InputBufferLength,
-                                          TAG_SYS_BUF);
+                                          TAG_IOBUF);
                 if (!Irp->AssociatedIrp.SystemBuffer)
                 {
                     /* Free the IRP and fail */

Reply via email to