static ERESOURCE FileSystemListLock;
static LIST_ENTRY FileSystemListHead;
-static FAST_MUTEX FsChangeNotifyListLock;
+static KGUARDED_MUTEX FsChangeNotifyListLock;
static LIST_ENTRY FsChangeNotifyListHead;
#define TAG_FILE_SYSTEM TAG('F', 'S', 'Y', 'S')
ExInitializeResourceLite(&FileSystemListLock);
InitializeListHead(&FsChangeNotifyListHead);
- ExInitializeFastMutex(&FsChangeNotifyListLock);
+ KeInitializeGuardedMutex(&FsChangeNotifyListLock);
}
if (current->DeviceObject == DeviceObject)
{
RemoveEntryList(current_entry);
- ExFreePool(current);
+ ExFreePoolWithTag(current, TAG_FILE_SYSTEM);
ExReleaseResourceLite(&FileSystemListLock);
KeLeaveCriticalRegion();
IopNotifyFileSystemChange(DeviceObject, FALSE);
PFS_CHANGE_NOTIFY_ENTRY ChangeEntry;
PLIST_ENTRY Entry;
- ExAcquireFastMutex(&FsChangeNotifyListLock);
+ KeAcquireGuardedMutex(&FsChangeNotifyListLock);
Entry = FsChangeNotifyListHead.Flink;
while (Entry != &FsChangeNotifyListHead)
{
Entry = Entry->Flink;
}
- ExReleaseFastMutex(&FsChangeNotifyListLock);
+ KeReleaseGuardedMutex(&FsChangeNotifyListLock);
}
Entry->DriverObject = DriverObject;
Entry->FSDNotificationProc = FSDNotificationProc;
- ExAcquireFastMutex(&FsChangeNotifyListLock);
+ KeAcquireGuardedMutex(&FsChangeNotifyListLock);
InsertHeadList(&FsChangeNotifyListHead,
&Entry->FsChangeNotifyList);
- ExReleaseFastMutex(&FsChangeNotifyListLock);
+ KeReleaseGuardedMutex(&FsChangeNotifyListLock);
return(STATUS_SUCCESS);
}
if (ChangeEntry->DriverObject == DriverObject &&
ChangeEntry->FSDNotificationProc == FSDNotificationProc)
{
- ExAcquireFastMutex(&FsChangeNotifyListLock);
+ KeAcquireGuardedMutex(&FsChangeNotifyListLock);
RemoveEntryList(Entry);
- ExReleaseFastMutex(&FsChangeNotifyListLock);
+ KeReleaseGuardedMutex(&FsChangeNotifyListLock);
- ExFreePool(Entry);
+ ExFreePoolWithTag(Entry, TAG_FS_CHANGE_NOTIFY);
return;
}