svn commit: r325221 - stable/11/sys/dev/iscsi

Andriy Gapon avg at FreeBSD.org
Tue Oct 31 09:54:42 UTC 2017


Author: avg
Date: Tue Oct 31 09:54:41 2017
New Revision: 325221
URL: https://svnweb.freebsd.org/changeset/base/325221

Log:
  MFC r324689: iscsi: do not hold the global lock while tearing down a session

Modified:
  stable/11/sys/dev/iscsi/iscsi.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/iscsi/iscsi.c
==============================================================================
--- stable/11/sys/dev/iscsi/iscsi.c	Tue Oct 31 07:47:57 2017	(r325220)
+++ stable/11/sys/dev/iscsi/iscsi.c	Tue Oct 31 09:54:41 2017	(r325221)
@@ -434,6 +434,8 @@ iscsi_maintenance_thread_terminate(struct iscsi_sessio
 
 	sc = is->is_softc;
 	sx_xlock(&sc->sc_lock);
+	TAILQ_REMOVE(&sc->sc_sessions, is, is_next);
+	sx_xunlock(&sc->sc_lock);
 
 	icl_conn_close(is->is_conn);
 	callout_drain(&is->is_callout);
@@ -465,8 +467,6 @@ iscsi_maintenance_thread_terminate(struct iscsi_sessio
 #ifdef ICL_KERNEL_PROXY
 	cv_destroy(&is->is_login_cv);
 #endif
-	TAILQ_REMOVE(&sc->sc_sessions, is, is_next);
-	sx_xunlock(&sc->sc_lock);
 
 	ISCSI_SESSION_DEBUG(is, "terminated");
 	free(is, M_ISCSI);


More information about the svn-src-all mailing list