diff options
| author | Andriy Gapon <avg@FreeBSD.org> | 2017-10-17 15:39:38 +0000 |
|---|---|---|
| committer | Andriy Gapon <avg@FreeBSD.org> | 2017-10-17 15:39:38 +0000 |
| commit | 20e9cab5faba8bb4589bb4cfbb1971bb744366fb (patch) | |
| tree | 26c37ecb8b4d67ac204cc63aa763a09f1cac1854 /sys/dev/iscsi | |
| parent | a71a5d885fc7d3ba1dd82e85a276b6895e66fa57 (diff) | |
Notes
Diffstat (limited to 'sys/dev/iscsi')
| -rw-r--r-- | sys/dev/iscsi/iscsi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c index fc2553d48b9d..fb3cced004e3 100644 --- a/sys/dev/iscsi/iscsi.c +++ b/sys/dev/iscsi/iscsi.c @@ -434,6 +434,8 @@ iscsi_maintenance_thread_terminate(struct iscsi_session *is) sc = is->is_softc; sx_xlock(&sc->sc_lock); + TAILQ_REMOVE(&sc->sc_sessions, is, is_next); + sx_xunlock(&sc->sc_lock); icl_conn_close(is->is_conn); callout_drain(&is->is_callout); @@ -465,8 +467,6 @@ iscsi_maintenance_thread_terminate(struct iscsi_session *is) #ifdef ICL_KERNEL_PROXY cv_destroy(&is->is_login_cv); #endif - TAILQ_REMOVE(&sc->sc_sessions, is, is_next); - sx_xunlock(&sc->sc_lock); ISCSI_SESSION_DEBUG(is, "terminated"); free(is, M_ISCSI); |
