From 3363077e2650bf003f50488595a484afc4bbe18a Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sun, 6 Sep 2015 10:06:59 +0000 Subject: [PATCH] [NTOSKRNL] Define & use a tag for FsRtlNotify* memory allocations svn path=/trunk/; revision=69052 --- reactos/ntoskrnl/fsrtl/notify.c | 8 ++++---- reactos/ntoskrnl/include/internal/tag.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/reactos/ntoskrnl/fsrtl/notify.c b/reactos/ntoskrnl/fsrtl/notify.c index 678f23802cf..73bd379d574 100644 --- a/reactos/ntoskrnl/fsrtl/notify.c +++ b/reactos/ntoskrnl/fsrtl/notify.c @@ -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; } @@ -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 */ @@ -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; } @@ -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; diff --git a/reactos/ntoskrnl/include/internal/tag.h b/reactos/ntoskrnl/include/internal/tag.h index 27cd6264896..e7f7bfccc64 100644 --- a/reactos/ntoskrnl/include/internal/tag.h +++ b/reactos/ntoskrnl/include/internal/tag.h @@ -50,6 +50,7 @@ #define TAG_FILE_SYSTEM 'SYSF' #define TAG_FS_CHANGE_NOTIFY 'NCSF' #define IFS_POOL_TAG 'trSF' +#define TAG_FS_NOTIFICATIONS 'NrSF' /* formerly located in io/iocomp.c */ #define IOC_TAG 'TCOI'