Skip to content

Commit

Permalink
Only initialise once in AddDevice
Browse files Browse the repository at this point in the history
including Storport.

Signed-off-by: Jorgen Lundman <[email protected]>
  • Loading branch information
lundman committed Sep 13, 2024
1 parent 9a51750 commit a3166ef
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions module/os/windows/zfs/zfs_ioctl_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,8 @@ OpenZFS_AddDevice(
}

// From DriverLoad
if (PhysicalDeviceObject->DeviceType == FILE_DEVICE_CONTROLLER) {
if (PhysicalDeviceObject->DeviceType == FILE_DEVICE_CONTROLLER &&
DriverExtension->PhysicalDeviceObject == NULL) {

DriverExtension->PhysicalDeviceObject = PhysicalDeviceObject;

Expand Down Expand Up @@ -1264,13 +1265,6 @@ OpenZFS_AddDevice(
return (STATUS_SUCCESS);
}

dprintf("Weird, AddDevice calling StorPort\n");

// Let StorPort have a go
if (DriverExtension->STOR_AddDevice)
status = DriverExtension->STOR_AddDevice(DriverObject,
PhysicalDeviceObject);

return (STATUS_SUCCESS);
}

Expand Down

0 comments on commit a3166ef

Please sign in to comment.