mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
Drop the periph/sim lock when calling disk_destroy().
This commit is contained in:
parent
d292906a7c
commit
cd5c9285cd
2 changed files with 3 additions and 5 deletions
|
|
@ -486,7 +486,9 @@ cdcleanup(struct cam_periph *periph)
|
|||
xpt_print(periph->path, "removing changer entry\n");
|
||||
free(softc->changer, M_DEVBUF);
|
||||
}
|
||||
cam_periph_unlock(periph);
|
||||
disk_destroy(softc->disk);
|
||||
cam_periph_lock(periph);
|
||||
free(softc, M_DEVBUF);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -939,13 +939,9 @@ dacleanup(struct cam_periph *periph)
|
|||
&& sysctl_ctx_free(&softc->sysctl_ctx) != 0) {
|
||||
xpt_print(periph->path, "can't remove sysctl context\n");
|
||||
}
|
||||
disk_destroy(softc->disk);
|
||||
|
||||
/*
|
||||
* XXX Gotta drop the periph lock so that the drain can complete with
|
||||
* deadlocking on the lock. Hopefully dropping here is safe.
|
||||
*/
|
||||
cam_periph_unlock(periph);
|
||||
disk_destroy(softc->disk);
|
||||
callout_drain(&softc->sendordered_c);
|
||||
cam_periph_lock(periph);
|
||||
free(softc, M_DEVBUF);
|
||||
|
|
|
|||
Loading…
Reference in a new issue