Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jun 2014 09:02:10 +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: r267574 - head/sys/cam/ctl
Message-ID:  <201406170902.s5H92AMm058016@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Tue Jun 17 09:02:10 2014
New Revision: 267574
URL: http://svnweb.freebsd.org/changeset/base/267574

Log:
  Make cs_terminating a bool; no functional changes.
  
  Sponsored by:	The FreeBSD Foundation

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

Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c
==============================================================================
--- head/sys/cam/ctl/ctl_frontend_iscsi.c	Tue Jun 17 08:56:16 2014	(r267573)
+++ head/sys/cam/ctl/ctl_frontend_iscsi.c	Tue Jun 17 09:02:10 2014	(r267574)
@@ -1130,8 +1130,6 @@ cfiscsi_maintenance_thread(void *arg)
 			icl_conn_shutdown(cs->cs_conn);
 			icl_conn_close(cs->cs_conn);
 
-			cs->cs_terminating++;
-
 			/*
 			 * XXX: We used to wait up to 30 seconds to deliver queued PDUs
 			 * 	to the initiator.  We also tried hard to deliver SCSI Responses
@@ -1151,9 +1149,9 @@ static void
 cfiscsi_session_terminate(struct cfiscsi_session *cs)
 {
 
-	if (cs->cs_terminating != 0)
+	if (cs->cs_terminating)
 		return;
-	cs->cs_terminating = 1;
+	cs->cs_terminating = true;
 	cv_signal(&cs->cs_maintenance_cv);
 #ifdef ICL_KERNEL_PROXY
 	cv_signal(&cs->cs_login_cv);

Modified: head/sys/cam/ctl/ctl_frontend_iscsi.h
==============================================================================
--- head/sys/cam/ctl/ctl_frontend_iscsi.h	Tue Jun 17 08:56:16 2014	(r267573)
+++ head/sys/cam/ctl/ctl_frontend_iscsi.h	Tue Jun 17 09:02:10 2014	(r267574)
@@ -72,7 +72,7 @@ struct cfiscsi_session {
 	int				cs_timeout;
 	int				cs_portal_group_tag;
 	struct cv			cs_maintenance_cv;
-	int				cs_terminating;
+	bool				cs_terminating;
 	size_t				cs_max_data_segment_length;
 	size_t				cs_max_burst_length;
 	bool				cs_immediate_data;



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