git://git.jankratochvil.net
/
reactos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
+general captive shutdown
[reactos.git]
/
ntoskrnl
/
io
/
fs.c
diff --git
a/ntoskrnl/io/fs.c
b/ntoskrnl/io/fs.c
index
26947a8
..
b96750b
100644
(file)
--- a/
ntoskrnl/io/fs.c
+++ b/
ntoskrnl/io/fs.c
@@
-174,7
+174,6
@@
IoInitFileSystemImplementation(VOID)
#endif /* LIBCAPTIVE */
}
#endif /* LIBCAPTIVE */
}
-#ifndef LIBCAPTIVE
VOID
IoShutdownRegisteredFileSystems(VOID)
VOID
IoShutdownRegisteredFileSystems(VOID)
@@
-189,11
+188,15
@@
IoShutdownRegisteredFileSystems(VOID)
DPRINT("IoShutdownRegisteredFileSystems()\n");
DPRINT("IoShutdownRegisteredFileSystems()\n");
+#ifndef LIBCAPTIVE
+ /* filesystems cannot be called at DISPATCH_LEVEL */
KeAcquireSpinLock(&FileSystemListLock,&oldlvl);
KeAcquireSpinLock(&FileSystemListLock,&oldlvl);
+#endif /* LIBCAPTIVE */
KeInitializeEvent(&Event,NotificationEvent,FALSE);
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);
{
current = CONTAINING_RECORD(current_entry,FILE_SYSTEM_OBJECT,Entry);
@@
-211,14
+214,14
@@
IoShutdownRegisteredFileSystems(VOID)
{
KeWaitForSingleObject(&Event,Executive,KernelMode,FALSE,NULL);
}
{
KeWaitForSingleObject(&Event,Executive,KernelMode,FALSE,NULL);
}
-
- current_entry = current_entry->Flink;
}
}
+#ifndef LIBCAPTIVE
+ /* filesystems cannot be called at DISPATCH_LEVEL */
KeReleaseSpinLock(&FileSystemListLock,oldlvl);
KeReleaseSpinLock(&FileSystemListLock,oldlvl);
+#endif /* LIBCAPTIVE */
}
}
-#endif /* LIBCAPTIVE */
static NTSTATUS
IopMountFileSystem(PDEVICE_OBJECT DeviceObject,
static NTSTATUS
IopMountFileSystem(PDEVICE_OBJECT DeviceObject,
@@
-587,7
+590,6
@@
IoRegisterFileSystem(IN PDEVICE_OBJECT DeviceObject)
#endif /* LIBCAPTIVE */
}
#endif /* LIBCAPTIVE */
}
-#ifndef LIBCAPTIVE
VOID STDCALL
IoUnregisterFileSystem(IN PDEVICE_OBJECT DeviceObject)
VOID STDCALL
IoUnregisterFileSystem(IN PDEVICE_OBJECT DeviceObject)
@@
-608,7
+610,9
@@
IoUnregisterFileSystem(IN PDEVICE_OBJECT DeviceObject)
RemoveEntryList(current_entry);
ExFreePool(current);
KeReleaseSpinLock(&FileSystemListLock,oldlvl);
RemoveEntryList(current_entry);
ExFreePool(current);
KeReleaseSpinLock(&FileSystemListLock,oldlvl);
+#ifndef LIBCAPTIVE
IopNotifyFileSystemChange(DeviceObject, FALSE);
IopNotifyFileSystemChange(DeviceObject, FALSE);
+#endif /* LIBCAPTIVE */
return;
}
current_entry = current_entry->Flink;
return;
}
current_entry = current_entry->Flink;
@@
-617,6
+621,8
@@
IoUnregisterFileSystem(IN PDEVICE_OBJECT DeviceObject)
}
}
+#ifndef LIBCAPTIVE
+
/**********************************************************************
* NAME EXPORTED
* IoGetBaseFileSystemDeviceObject@4
/**********************************************************************
* NAME EXPORTED
* IoGetBaseFileSystemDeviceObject@4