From 83471265bdf87b193f004fde316d03d891eb2d34 Mon Sep 17 00:00:00 2001 From: short <> Date: Fri, 28 Mar 2003 21:00:36 +0000 Subject: [PATCH] IoShutdownRegisteredFileSystems(): Cope with uncalled IoUnregisterFileSystem(). - at least ntfs.sys-NT5.1sp1 appears to not to unregister itself --- ntoskrnl/io/fs.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ntoskrnl/io/fs.c b/ntoskrnl/io/fs.c index fa340d8..a241167 100644 --- a/ntoskrnl/io/fs.c +++ b/ntoskrnl/io/fs.c @@ -199,7 +199,15 @@ IoShutdownRegisteredFileSystems(VOID) { current = CONTAINING_RECORD(current_entry,FILE_SYSTEM_OBJECT,Entry); if (current==current_last) - KeBugCheck(0); /* filesystem forgot to call IoUnregisterFileSystem() */ + { + /* At least ntfs.sys-NT5.1sp1 appears to not to unregister itself. + * It does not import symbol IoUnregisterFileSystem() at all! + * BTW also ext2fsd.sys<=v0.10A also forgets to call IoUnregisterFileSystem(). + */ + DPRINT("IoShutdownRegisteredFileSystems(): WARNING: filesystem forgot to call IoUnregisterFileSystem() !!!\n"); + IoUnregisterFileSystem(current->DeviceObject); + continue; + } current_last=current; /* send IRP_MJ_SHUTDOWN */ -- 1.8.3.1