Remove unneccessary code, which also introduced a (very minor)

race condition, due to a missing call to cfiscsi_target_release().

Discussed with:	mav@
Tested by:	Eugene M. Zheganin <emz at norma.perm.ru> (earlier version)
MFC after:	2 weeks
Sponsored by:	playkey.net
This commit is contained in:
Edward Tomasz Napierala 2018-08-21 14:34:24 +00:00
parent 5dff1c3845
commit 3b95cface1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=338139

View File

@ -2233,12 +2233,6 @@ cfiscsi_ioctl_port_remove(struct ctl_req *req)
"can't find target \"%s\"", target);
return;
}
if (ct->ct_state != CFISCSI_TARGET_STATE_ACTIVE) {
req->status = CTL_LUN_ERROR;
snprintf(req->error_str, sizeof(req->error_str),
"target \"%s\" is already dying", target);
return;
}
ct->ct_state = CFISCSI_TARGET_STATE_DYING;
ctl_port_offline(&ct->ct_port);