aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/ctl/ctl_frontend_iscsi.c
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2017-01-04 12:50:44 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2017-01-04 12:50:44 +0000
commit3a408ce90d983429499243a6087f8bd149977548 (patch)
treeb446af8f82f667d5c8412f9d8e7486b97b4dfea3 /sys/cam/ctl/ctl_frontend_iscsi.c
parentccd0cf8ffa619f5d7cd4732643ad015083152d99 (diff)
downloadsrc-3a408ce90d983429499243a6087f8bd149977548.tar.gz
src-3a408ce90d983429499243a6087f8bd149977548.zip
Don't release the cfiscsi session refcount too early. It wasn't
observed to fix any actual error, but it's the right thing to do from the correctness point of view. Tested by: Eugene M. Zheganin <emz at norma.perm.ru> MFC after: 1 month
Notes
Notes: svn path=/head/; revision=311283
Diffstat (limited to 'sys/cam/ctl/ctl_frontend_iscsi.c')
-rw-r--r--sys/cam/ctl/ctl_frontend_iscsi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/cam/ctl/ctl_frontend_iscsi.c b/sys/cam/ctl/ctl_frontend_iscsi.c
index 98e33faa62c0..443a4790a126 100644
--- a/sys/cam/ctl/ctl_frontend_iscsi.c
+++ b/sys/cam/ctl/ctl_frontend_iscsi.c
@@ -2963,7 +2963,6 @@ cfiscsi_done(union ctl_io *io)
request = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr;
cs = PDU_SESSION(request);
- refcount_release(&cs->cs_outstanding_ctl_pdus);
switch (request->ip_bhs->bhs_opcode & ~ISCSI_BHS_OPCODE_IMMEDIATE) {
case ISCSI_BHS_OPCODE_SCSI_COMMAND:
@@ -2976,4 +2975,6 @@ cfiscsi_done(union ctl_io *io)
panic("cfiscsi_done called with wrong opcode 0x%x",
request->ip_bhs->bhs_opcode);
}
+
+ refcount_release(&cs->cs_outstanding_ctl_pdus);
}