Author: trasz
Date: Mon Apr 16 17:08:58 2018
New Revision: 332612
URL: https://svnweb.freebsd.org/changeset/base/332612

Log:
  MFC r326730:
  
  Move the DIAGNOSTIC check for lost iSCSI PDUs from icl_conn_close()
  to icl_conn_free().  It's perfectly valid for the counter to be non-zero
  in the former.
  
  Sponsored by: playkey.net

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

Modified: stable/11/sys/dev/iscsi/icl_soft.c
==============================================================================
--- stable/11/sys/dev/iscsi/icl_soft.c  Mon Apr 16 17:06:18 2018        
(r332611)
+++ stable/11/sys/dev/iscsi/icl_soft.c  Mon Apr 16 17:08:58 2018        
(r332612)
@@ -1172,6 +1172,11 @@ void
 icl_soft_conn_free(struct icl_conn *ic)
 {
 
+#ifdef DIAGNOSTIC
+       KASSERT(ic->ic_outstanding_pdus == 0,
+           ("destroying session with %d outstanding PDUs",
+            ic->ic_outstanding_pdus));
+#endif
        cv_destroy(&ic->ic_send_cv);
        cv_destroy(&ic->ic_receive_cv);
        kobj_delete((struct kobj *)ic, M_ICL_SOFT);
@@ -1412,11 +1417,6 @@ icl_soft_conn_close(struct icl_conn *ic)
 
        KASSERT(STAILQ_EMPTY(&ic->ic_to_send),
            ("destroying session with non-empty send queue"));
-#ifdef DIAGNOSTIC
-       KASSERT(ic->ic_outstanding_pdus == 0,
-           ("destroying session with %d outstanding PDUs",
-            ic->ic_outstanding_pdus));
-#endif
        ICL_CONN_UNLOCK(ic);
 }
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to