Skip to content

Commit

Permalink
Move IoDetachDevice inside the sanity check
Browse files Browse the repository at this point in the history
  • Loading branch information
lundman committed Feb 10, 2023
1 parent dbd33f6 commit 0d8d864
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions module/os/windows/zfs/zfs_vnops_windows_mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -1560,11 +1560,12 @@ zfs_windows_unmount(zfs_cmd_t *zc)
// Release devices
IoDeleteSymbolicLink(&zmo->symlink_name);

IoDetachDevice(zmo->deviceObject);

// fsDeviceObject
if (zmo->deviceObject)
if (zmo->deviceObject) {
IoDetachDevice(zmo->deviceObject);
IoDeleteDevice(zmo->deviceObject);
}

// diskDeviceObject
if (zmo->diskDeviceObject)
IoDeleteDevice(zmo->diskDeviceObject);
Expand Down

0 comments on commit 0d8d864

Please sign in to comment.