Module Name: src Committed By: mlelstv Date: Sun Dec 3 07:24:47 UTC 2017
Modified Files: src/sys/dev/iscsi: iscsi_main.c Log Message: unreference session only for responses to SCSI commands. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/dev/iscsi/iscsi_main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/iscsi/iscsi_main.c diff -u src/sys/dev/iscsi/iscsi_main.c:1.25 src/sys/dev/iscsi/iscsi_main.c:1.26 --- src/sys/dev/iscsi/iscsi_main.c:1.25 Thu Nov 30 20:25:55 2017 +++ src/sys/dev/iscsi/iscsi_main.c Sun Dec 3 07:24:47 2017 @@ -559,6 +559,7 @@ iscsi_done(ccb_t *ccb) DEB(9, ("iscsi_done\n")); if (xs != NULL) { + ccb->xs = NULL; xs->resid = ccb->residual; switch (ccb->status) { @@ -596,14 +597,14 @@ iscsi_done(ccb_t *ccb) break; } + unref_session(ccb->session); + DEB(99, ("Calling scsipi_done (%p), err = %d\n", xs, xs->error)); scsipi_done(xs); DEB(99, ("scsipi_done returned\n")); } else { DEBOUT(("ISCSI: iscsi_done CCB %p without XS\n", ccb)); } - - unref_session(ccb->session); } SYSCTL_SETUP(sysctl_iscsi_setup, "ISCSI subtree setup")