aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/loopback
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2016-05-02 09:45:21 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2016-05-10 04:19:18 -0400
commit22d11759a4e7018f8cd7914e4e706ca2c96d6c01 (patch)
tree788d1e4e1828d66f60f9d444c298081013e4d7fa /drivers/target/loopback
parentfba81f8831b20272a97a990e5d47c332e9b1f65d (diff)
target: make ->shutdown_session optional
Turns out the template and thus many drivers got the return value wrong: 0 means the fabrics driver needs to put a session reference, which no driver except for the iSCSI target drivers did. Fortunately none of these drivers supports explicit Node ACLs, so the bug was harmless. Even without that only qla2xxx and iscsi every did real work in shutdown_session, so get rid of the boilerplate code in all other drivers. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/loopback')
-rw-r--r--drivers/target/loopback/tcm_loop.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c
index 0ad5ac541a7f..0941b2c13f5a 100644
--- a/drivers/target/loopback/tcm_loop.c
+++ b/drivers/target/loopback/tcm_loop.c
@@ -601,11 +601,6 @@ static int tcm_loop_get_cmd_state(struct se_cmd *se_cmd)
601 return tl_cmd->sc_cmd_state; 601 return tl_cmd->sc_cmd_state;
602} 602}
603 603
604static int tcm_loop_shutdown_session(struct se_session *se_sess)
605{
606 return 0;
607}
608
609static void tcm_loop_close_session(struct se_session *se_sess) 604static void tcm_loop_close_session(struct se_session *se_sess)
610{ 605{
611 return; 606 return;
@@ -1243,7 +1238,6 @@ static const struct target_core_fabric_ops loop_ops = {
1243 .tpg_get_inst_index = tcm_loop_get_inst_index, 1238 .tpg_get_inst_index = tcm_loop_get_inst_index,
1244 .check_stop_free = tcm_loop_check_stop_free, 1239 .check_stop_free = tcm_loop_check_stop_free,
1245 .release_cmd = tcm_loop_release_cmd, 1240 .release_cmd = tcm_loop_release_cmd,
1246 .shutdown_session = tcm_loop_shutdown_session,
1247 .close_session = tcm_loop_close_session, 1241 .close_session = tcm_loop_close_session,
1248 .sess_get_index = tcm_loop_sess_get_index, 1242 .sess_get_index = tcm_loop_sess_get_index,
1249 .write_pending = tcm_loop_write_pending, 1243 .write_pending = tcm_loop_write_pending,