Fix error handling.
MFC after: 1 month Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
82babffba9
commit
09f2b94bf4
@ -1766,15 +1766,17 @@ iscsi_ioctl_session_add(struct iscsi_softc *sc, struct iscsi_session_add *isa)
|
||||
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.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user