From 44f33d0fb5a7181cc34529c211d7b5039d8a0a4b Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 2 May 2016 15:45:24 +0200 Subject: iscsi-target: remove usage of ->shutdown_session MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ->shutdown session only decideѕ if the target core calls ->close_session directly, or if the fabrics drivers calls it manually later through target_put_session, which at this point will always close the session as it has been removed from the lookup list and thus no new references will be acquired from the core. So instead remove ->shutdown and have the core call ->close_session directly, and replace all calls to target_put_session in the iSCSI target with direct calls to iscsit_close_session. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- drivers/target/iscsi/iscsi_target_login.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/target/iscsi/iscsi_target_login.c') diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c index a09498f16690..b5212f0f9571 100644 --- a/drivers/target/iscsi/iscsi_target_login.c +++ b/drivers/target/iscsi/iscsi_target_login.c @@ -228,7 +228,7 @@ int iscsi_check_for_session_reinstatement(struct iscsi_conn *conn) if (sess->session_state == TARG_SESS_STATE_FAILED) { spin_unlock_bh(&sess->conn_lock); iscsit_dec_session_usage_count(sess); - target_put_session(sess->se_sess); + iscsit_close_session(sess); return 0; } spin_unlock_bh(&sess->conn_lock); @@ -236,7 +236,7 @@ int iscsi_check_for_session_reinstatement(struct iscsi_conn *conn) iscsit_stop_session(sess, 1, 1); iscsit_dec_session_usage_count(sess); - target_put_session(sess->se_sess); + iscsit_close_session(sess); return 0; } -- cgit v1.2.1