Skip to content

Commit

Permalink
Windows: zvol_fini uses system_taskq, fix unload order
Browse files Browse the repository at this point in the history
  • Loading branch information
lundman committed Feb 9, 2021
1 parent a4792cf commit 9a2bde9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions module/os/windows/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ DRIVER_UNLOAD OpenZFS_Fini;
void OpenZFS_Fini(PDRIVER_OBJECT DriverObject)
{
KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_INFO_LEVEL, "OpenZFS_Fini\n"));
system_taskq_fini();

zfs_vfsops_fini();

zfs_kmod_fini();

system_taskq_fini();

if (STOR_DriverUnload != NULL) {
STOR_DriverUnload(DriverObject);
STOR_DriverUnload = NULL;
Expand Down Expand Up @@ -89,6 +90,8 @@ NTSTATUS DriverEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PUNICODE_STRING pRe

kstat_windows_init(pRegistryPath);

system_taskq_init();

/*
* Initialise storport for the ZVOL virtual disks. This also
* sets the Driver Callbacks, so we make a copy of them, so
Expand Down Expand Up @@ -116,7 +119,6 @@ NTSTATUS DriverEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PUNICODE_STRING pRe
/* Register fs with Win */
zfs_vfsops_init();

system_taskq_init();

KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL, "OpenZFS: Started\n"));
return STATUS_SUCCESS;
Expand Down

0 comments on commit 9a2bde9

Please sign in to comment.