Skip to content

Commit

Permalink
nvmf: Deregister the post_sync eventhandler correctly during detach
Browse files Browse the repository at this point in the history
Previously the handler was removed from the wrong eventhandler list.

Fixes:		f46d497 nvmf: Handle shutdowns more gracefully
Sponsored by:	Chelsio Communications
  • Loading branch information
bsdjhb committed Nov 2, 2024
1 parent 06b2ed7 commit a6ec214
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/dev/nvmf/host/nvmf.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ nvmf_detach(device_t dev)
sx_xunlock(&sc->connection_lock);

EVENTHANDLER_DEREGISTER(shutdown_pre_sync, sc->shutdown_pre_sync_eh);
EVENTHANDLER_DEREGISTER(shutdown_pre_sync, sc->shutdown_post_sync_eh);
EVENTHANDLER_DEREGISTER(shutdown_post_sync, sc->shutdown_post_sync_eh);

nvmf_destroy_sim(sc);
for (i = 0; i < sc->cdata->nn; i++) {
Expand Down

0 comments on commit a6ec214

Please sign in to comment.