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:
trasz 2018-08-21 14:34:24 +00:00
parent 3055b3b326
commit 96a2cf426c

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);