From 3b95cface136029fde3bef18dbe4424b0594904a Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Tue, 21 Aug 2018 14:34:24 +0000 Subject: 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 (earlier version) MFC after: 2 weeks Sponsored by: playkey.net --- sys/cam/ctl/ctl_frontend_iscsi.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'sys/cam/ctl/ctl_frontend_iscsi.c') diff --git a/sys/cam/ctl/ctl_frontend_iscsi.c b/sys/cam/ctl/ctl_frontend_iscsi.c index 22a5b3e1fb9d..2d3766a8e73b 100644 --- a/sys/cam/ctl/ctl_frontend_iscsi.c +++ b/sys/cam/ctl/ctl_frontend_iscsi.c @@ -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); -- cgit v1.2.3