Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2018 14:34:25 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r338139 - head/sys/cam/ctl
Message-ID:  <201808211434.w7LEYPwP067580@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Tue Aug 21 14:34:24 2018
New Revision: 338139
URL: https://svnweb.freebsd.org/changeset/base/338139

Log:
  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

Modified:
  head/sys/cam/ctl/ctl_frontend_iscsi.c

Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c
==============================================================================
--- head/sys/cam/ctl/ctl_frontend_iscsi.c	Tue Aug 21 14:12:30 2018	(r338138)
+++ head/sys/cam/ctl/ctl_frontend_iscsi.c	Tue Aug 21 14:34:24 2018	(r338139)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808211434.w7LEYPwP067580>