Tear down sysctls only after detaching children. This lets you enable

debugging while detaching hangs.
This commit is contained in:
mlelstv 2016-06-05 04:53:22 +00:00
parent 015cdd4666
commit cac97d38f5
1 changed files with 2 additions and 2 deletions

View File

@ -663,12 +663,12 @@ iscsi_modcmd(modcmd_t cmd, void *arg)
case MODULE_CMD_FINI:
#ifdef _MODULE
sysctl_teardown(&clog);
error = config_cfdata_detach(iscsi_cfdata);
if (error)
return error;
sysctl_teardown(&clog);
config_cfattach_detach(iscsi_cd.cd_name, &iscsi_ca);
config_cfdriver_detach(&iscsi_cd);
devsw_detach(NULL, &iscsi_cdevsw);