#endif /* LIBCAPTIVE */
}
-#ifndef LIBCAPTIVE
VOID
IoShutdownRegisteredFileSystems(VOID)
DPRINT("IoShutdownRegisteredFileSystems()\n");
+#ifndef LIBCAPTIVE
+ /* filesystems cannot be called at DISPATCH_LEVEL */
KeAcquireSpinLock(&FileSystemListLock,&oldlvl);
+#endif /* LIBCAPTIVE */
KeInitializeEvent(&Event,NotificationEvent,FALSE);
- current_entry = FileSystemListHead.Flink;
- while (current_entry!=(&FileSystemListHead))
+ /* 'current' will get IoDeleteDevice()ed by IRP_MJ_SHUTDOWN! */
+ /* FIXME: deadlock loop detection */
+ while ((current_entry = FileSystemListHead.Flink)!=(&FileSystemListHead))
{
current = CONTAINING_RECORD(current_entry,FILE_SYSTEM_OBJECT,Entry);
{
KeWaitForSingleObject(&Event,Executive,KernelMode,FALSE,NULL);
}
-
- current_entry = current_entry->Flink;
}
+#ifndef LIBCAPTIVE
+ /* filesystems cannot be called at DISPATCH_LEVEL */
KeReleaseSpinLock(&FileSystemListLock,oldlvl);
+#endif /* LIBCAPTIVE */
}
-#endif /* LIBCAPTIVE */
static NTSTATUS
IopMountFileSystem(PDEVICE_OBJECT DeviceObject,
#endif /* LIBCAPTIVE */
}
-#ifndef LIBCAPTIVE
VOID STDCALL
IoUnregisterFileSystem(IN PDEVICE_OBJECT DeviceObject)
RemoveEntryList(current_entry);
ExFreePool(current);
KeReleaseSpinLock(&FileSystemListLock,oldlvl);
+#ifndef LIBCAPTIVE
IopNotifyFileSystemChange(DeviceObject, FALSE);
+#endif /* LIBCAPTIVE */
return;
}
current_entry = current_entry->Flink;
}
+#ifndef LIBCAPTIVE
+
/**********************************************************************
* NAME EXPORTED
* IoGetBaseFileSystemDeviceObject@4