svn commit: r278233 - head/sys/dev/iscsi
Edward Tomasz Napierala
trasz at FreeBSD.org
Thu Feb 5 07:16:46 UTC 2015
Author: trasz
Date: Thu Feb 5 07:16:45 2015
New Revision: 278233
URL: https://svnweb.freebsd.org/changeset/base/278233
Log:
Fix error handling.
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/dev/iscsi/iscsi.c
Modified: head/sys/dev/iscsi/iscsi.c
==============================================================================
--- head/sys/dev/iscsi/iscsi.c Thu Feb 5 06:37:59 2015 (r278232)
+++ head/sys/dev/iscsi/iscsi.c Thu Feb 5 07:16:45 2015 (r278233)
@@ -1766,15 +1766,17 @@ iscsi_ioctl_session_add(struct iscsi_sof
arc4rand(&is->is_isid[1], 5, 0);
is->is_tsih = 0;
callout_init(&is->is_callout, 1);
- callout_reset(&is->is_callout, 1 * hz, iscsi_callout, is);
- TAILQ_INSERT_TAIL(&sc->sc_sessions, is, is_next);
error = kthread_add(iscsi_maintenance_thread, is, NULL, NULL, 0, 0, "iscsimt");
if (error != 0) {
ISCSI_SESSION_WARN(is, "kthread_add(9) failed with error %d", error);
+ sx_xunlock(&sc->sc_lock);
return (error);
}
+ callout_reset(&is->is_callout, 1 * hz, iscsi_callout, is);
+ TAILQ_INSERT_TAIL(&sc->sc_sessions, is, is_next);
+
/*
* Trigger immediate reconnection.
*/
More information about the svn-src-all
mailing list