svn commit: r235027 - projects/iscsi_opt/sys/dev/iscsi/initiator
Kip Macy
kmacy at FreeBSD.org
Fri May 4 18:32:18 UTC 2012
Author: kmacy
Date: Fri May 4 18:32:17 2012
New Revision: 235027
URL: http://svn.freebsd.org/changeset/base/235027
Log:
always schedule a release from the socket callout
Modified:
projects/iscsi_opt/sys/dev/iscsi/initiator/isc_sm.c
Modified: projects/iscsi_opt/sys/dev/iscsi/initiator/isc_sm.c
==============================================================================
--- projects/iscsi_opt/sys/dev/iscsi/initiator/isc_sm.c Fri May 4 18:30:40 2012 (r235026)
+++ projects/iscsi_opt/sys/dev/iscsi/initiator/isc_sm.c Fri May 4 18:32:17 2012 (r235027)
@@ -362,7 +362,7 @@ isc_so_snd_upcall(struct socket *so, voi
soupcall_clear(so, SO_SND);
sp->space_needed = 0;
- mtx_lock(sp->cam_sim->mtx);
+ CAM_LOCK(sp);
if (sp->cam_sim->devq->send_queue.qfrozen_cnt[0] != 1) {
@@ -371,17 +371,13 @@ isc_so_snd_upcall(struct socket *so, voi
printf("qfrozen_cnt went to bad value %d\n",
sp->cam_sim->devq->send_queue.qfrozen_cnt[0]);
}
- if (sp->cam_flags & ISC_QFROZEN) {
- sp->cam_flags |= ISC_QUNFREEZE;
-
- mtx_lock(&sp->io_mtx);
- if (sp->flags & ISC_OWAITING)
- wakeup(&sp->flags);
- mtx_unlock(&sp->io_mtx);
- } else
- printf("queue already released !!! %d\n",
- sp->cam_sim->devq->send_queue.qfrozen_cnt[0]);
- mtx_unlock(sp->cam_sim->mtx);
+ sp->cam_flags |= ISC_QUNFREEZE;
+
+ mtx_lock(&sp->io_mtx);
+ if (sp->flags & ISC_OWAITING)
+ wakeup(&sp->flags);
+ mtx_unlock(&sp->io_mtx);
+ CAM_UNLOCK(sp);
return (SU_OK);
}
More information about the svn-src-projects
mailing list