diff options
| -rwxr-xr-x | Documentation/target/tcm_mod_builder.py | 8 | ||||
| -rw-r--r-- | drivers/infiniband/ulp/srpt/ib_srpt.c | 9 | ||||
| -rw-r--r-- | drivers/target/loopback/tcm_loop.c | 6 | ||||
| -rw-r--r-- | drivers/target/sbp/sbp_target.c | 6 | ||||
| -rw-r--r-- | drivers/target/target_core_configfs.c | 4 | ||||
| -rw-r--r-- | drivers/target/target_core_tpg.c | 5 | ||||
| -rw-r--r-- | drivers/target/tcm_fc/tcm_fc.h | 1 | ||||
| -rw-r--r-- | drivers/target/tcm_fc/tfc_conf.c | 1 | ||||
| -rw-r--r-- | drivers/target/tcm_fc/tfc_sess.c | 12 | ||||
| -rw-r--r-- | drivers/usb/gadget/function/f_tcm.c | 6 | ||||
| -rw-r--r-- | drivers/vhost/scsi.c | 6 | ||||
| -rw-r--r-- | drivers/xen/xen-scsiback.c | 6 |
12 files changed, 4 insertions, 66 deletions
diff --git a/Documentation/target/tcm_mod_builder.py b/Documentation/target/tcm_mod_builder.py index 7d370c9b1450..6b8aa4086c5d 100755 --- a/Documentation/target/tcm_mod_builder.py +++ b/Documentation/target/tcm_mod_builder.py | |||
| @@ -294,7 +294,6 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name): | |||
| 294 | buf += " .tpg_check_prod_mode_write_protect = " + fabric_mod_name + "_check_false,\n" | 294 | buf += " .tpg_check_prod_mode_write_protect = " + fabric_mod_name + "_check_false,\n" |
| 295 | buf += " .tpg_get_inst_index = " + fabric_mod_name + "_tpg_get_inst_index,\n" | 295 | buf += " .tpg_get_inst_index = " + fabric_mod_name + "_tpg_get_inst_index,\n" |
| 296 | buf += " .release_cmd = " + fabric_mod_name + "_release_cmd,\n" | 296 | buf += " .release_cmd = " + fabric_mod_name + "_release_cmd,\n" |
| 297 | buf += " .shutdown_session = " + fabric_mod_name + "_shutdown_session,\n" | ||
| 298 | buf += " .close_session = " + fabric_mod_name + "_close_session,\n" | 297 | buf += " .close_session = " + fabric_mod_name + "_close_session,\n" |
| 299 | buf += " .sess_get_index = " + fabric_mod_name + "_sess_get_index,\n" | 298 | buf += " .sess_get_index = " + fabric_mod_name + "_sess_get_index,\n" |
| 300 | buf += " .sess_get_initiator_sid = NULL,\n" | 299 | buf += " .sess_get_initiator_sid = NULL,\n" |
| @@ -467,13 +466,6 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name): | |||
| 467 | buf += "}\n\n" | 466 | buf += "}\n\n" |
| 468 | bufi += "void " + fabric_mod_name + "_release_cmd(struct se_cmd *);\n" | 467 | bufi += "void " + fabric_mod_name + "_release_cmd(struct se_cmd *);\n" |
| 469 | 468 | ||
| 470 | if re.search('shutdown_session\)\(', fo): | ||
| 471 | buf += "int " + fabric_mod_name + "_shutdown_session(struct se_session *se_sess)\n" | ||
| 472 | buf += "{\n" | ||
| 473 | buf += " return 0;\n" | ||
| 474 | buf += "}\n\n" | ||
| 475 | bufi += "int " + fabric_mod_name + "_shutdown_session(struct se_session *);\n" | ||
| 476 | |||
| 477 | if re.search('close_session\)\(', fo): | 469 | if re.search('close_session\)\(', fo): |
| 478 | buf += "void " + fabric_mod_name + "_close_session(struct se_session *se_sess)\n" | 470 | buf += "void " + fabric_mod_name + "_close_session(struct se_session *se_sess)\n" |
| 479 | buf += "{\n" | 471 | buf += "{\n" |
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index 8b42401d4795..3b425af04572 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c | |||
| @@ -1960,14 +1960,6 @@ static void __srpt_close_all_ch(struct srpt_device *sdev) | |||
| 1960 | } | 1960 | } |
| 1961 | } | 1961 | } |
| 1962 | 1962 | ||
| 1963 | /** | ||
| 1964 | * srpt_shutdown_session() - Whether or not a session may be shut down. | ||
| 1965 | */ | ||
| 1966 | static int srpt_shutdown_session(struct se_session *se_sess) | ||
| 1967 | { | ||
| 1968 | return 1; | ||
| 1969 | } | ||
| 1970 | |||
| 1971 | static void srpt_free_ch(struct kref *kref) | 1963 | static void srpt_free_ch(struct kref *kref) |
| 1972 | { | 1964 | { |
| 1973 | struct srpt_rdma_ch *ch = container_of(kref, struct srpt_rdma_ch, kref); | 1965 | struct srpt_rdma_ch *ch = container_of(kref, struct srpt_rdma_ch, kref); |
| @@ -3287,7 +3279,6 @@ static const struct target_core_fabric_ops srpt_template = { | |||
| 3287 | .tpg_get_inst_index = srpt_tpg_get_inst_index, | 3279 | .tpg_get_inst_index = srpt_tpg_get_inst_index, |
| 3288 | .release_cmd = srpt_release_cmd, | 3280 | .release_cmd = srpt_release_cmd, |
| 3289 | .check_stop_free = srpt_check_stop_free, | 3281 | .check_stop_free = srpt_check_stop_free, |
| 3290 | .shutdown_session = srpt_shutdown_session, | ||
| 3291 | .close_session = srpt_close_session, | 3282 | .close_session = srpt_close_session, |
| 3292 | .sess_get_index = srpt_sess_get_index, | 3283 | .sess_get_index = srpt_sess_get_index, |
| 3293 | .sess_get_initiator_sid = NULL, | 3284 | .sess_get_initiator_sid = NULL, |
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 | ||
| 604 | static int tcm_loop_shutdown_session(struct se_session *se_sess) | ||
| 605 | { | ||
| 606 | return 0; | ||
| 607 | } | ||
| 608 | |||
| 609 | static void tcm_loop_close_session(struct se_session *se_sess) | 604 | static 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, |
diff --git a/drivers/target/sbp/sbp_target.c b/drivers/target/sbp/sbp_target.c index c57e7884973d..6c8b8f84a047 100644 --- a/drivers/target/sbp/sbp_target.c +++ b/drivers/target/sbp/sbp_target.c | |||
| @@ -1726,11 +1726,6 @@ static void sbp_release_cmd(struct se_cmd *se_cmd) | |||
| 1726 | sbp_free_request(req); | 1726 | sbp_free_request(req); |
| 1727 | } | 1727 | } |
| 1728 | 1728 | ||
| 1729 | static int sbp_shutdown_session(struct se_session *se_sess) | ||
| 1730 | { | ||
| 1731 | return 0; | ||
| 1732 | } | ||
| 1733 | |||
| 1734 | static void sbp_close_session(struct se_session *se_sess) | 1729 | static void sbp_close_session(struct se_session *se_sess) |
| 1735 | { | 1730 | { |
| 1736 | return; | 1731 | return; |
| @@ -2349,7 +2344,6 @@ static const struct target_core_fabric_ops sbp_ops = { | |||
| 2349 | .tpg_check_prod_mode_write_protect = sbp_check_false, | 2344 | .tpg_check_prod_mode_write_protect = sbp_check_false, |
| 2350 | .tpg_get_inst_index = sbp_tpg_get_inst_index, | 2345 | .tpg_get_inst_index = sbp_tpg_get_inst_index, |
| 2351 | .release_cmd = sbp_release_cmd, | 2346 | .release_cmd = sbp_release_cmd, |
| 2352 | .shutdown_session = sbp_shutdown_session, | ||
| 2353 | .close_session = sbp_close_session, | 2347 | .close_session = sbp_close_session, |
| 2354 | .sess_get_index = sbp_sess_get_index, | 2348 | .sess_get_index = sbp_sess_get_index, |
| 2355 | .write_pending = sbp_write_pending, | 2349 | .write_pending = sbp_write_pending, |
diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index 73c23c75528a..75c5000ca95e 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c | |||
| @@ -385,10 +385,6 @@ static int target_fabric_tf_ops_check(const struct target_core_fabric_ops *tfo) | |||
| 385 | pr_err("Missing tfo->release_cmd()\n"); | 385 | pr_err("Missing tfo->release_cmd()\n"); |
| 386 | return -EINVAL; | 386 | return -EINVAL; |
| 387 | } | 387 | } |
| 388 | if (!tfo->shutdown_session) { | ||
| 389 | pr_err("Missing tfo->shutdown_session()\n"); | ||
| 390 | return -EINVAL; | ||
| 391 | } | ||
| 392 | if (!tfo->close_session) { | 388 | if (!tfo->close_session) { |
| 393 | pr_err("Missing tfo->close_session()\n"); | 389 | pr_err("Missing tfo->close_session()\n"); |
| 394 | return -EINVAL; | 390 | return -EINVAL; |
diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c index b1ac600f5b45..a81a37045403 100644 --- a/drivers/target/target_core_tpg.c +++ b/drivers/target/target_core_tpg.c | |||
| @@ -353,7 +353,10 @@ restart: | |||
| 353 | list_del_init(&sess->sess_acl_list); | 353 | list_del_init(&sess->sess_acl_list); |
| 354 | 354 | ||
| 355 | spin_unlock_irqrestore(&acl->nacl_sess_lock, flags); | 355 | spin_unlock_irqrestore(&acl->nacl_sess_lock, flags); |
| 356 | ret = acl->se_tpg->se_tpg_tfo->shutdown_session(sess); | 356 | if (acl->se_tpg->se_tpg_tfo->shutdown_session) |
| 357 | ret = acl->se_tpg->se_tpg_tfo->shutdown_session(sess); | ||
| 358 | else | ||
| 359 | ret = 1; | ||
| 357 | target_put_session(sess); | 360 | target_put_session(sess); |
| 358 | if (ret) | 361 | if (ret) |
| 359 | target_put_session(sess); | 362 | target_put_session(sess); |
diff --git a/drivers/target/tcm_fc/tcm_fc.h b/drivers/target/tcm_fc/tcm_fc.h index c30003bd4ff0..e28209b99b59 100644 --- a/drivers/target/tcm_fc/tcm_fc.h +++ b/drivers/target/tcm_fc/tcm_fc.h | |||
| @@ -139,7 +139,6 @@ extern unsigned int ft_debug_logging; | |||
| 139 | * Session ops. | 139 | * Session ops. |
| 140 | */ | 140 | */ |
| 141 | void ft_sess_put(struct ft_sess *); | 141 | void ft_sess_put(struct ft_sess *); |
| 142 | int ft_sess_shutdown(struct se_session *); | ||
| 143 | void ft_sess_close(struct se_session *); | 142 | void ft_sess_close(struct se_session *); |
| 144 | u32 ft_sess_get_index(struct se_session *); | 143 | u32 ft_sess_get_index(struct se_session *); |
| 145 | u32 ft_sess_get_port_name(struct se_session *, unsigned char *, u32); | 144 | u32 ft_sess_get_port_name(struct se_session *, unsigned char *, u32); |
diff --git a/drivers/target/tcm_fc/tfc_conf.c b/drivers/target/tcm_fc/tfc_conf.c index 4d375e95841b..42ee91123dca 100644 --- a/drivers/target/tcm_fc/tfc_conf.c +++ b/drivers/target/tcm_fc/tfc_conf.c | |||
| @@ -442,7 +442,6 @@ static const struct target_core_fabric_ops ft_fabric_ops = { | |||
| 442 | .tpg_get_inst_index = ft_tpg_get_inst_index, | 442 | .tpg_get_inst_index = ft_tpg_get_inst_index, |
| 443 | .check_stop_free = ft_check_stop_free, | 443 | .check_stop_free = ft_check_stop_free, |
| 444 | .release_cmd = ft_release_cmd, | 444 | .release_cmd = ft_release_cmd, |
| 445 | .shutdown_session = ft_sess_shutdown, | ||
| 446 | .close_session = ft_sess_close, | 445 | .close_session = ft_sess_close, |
| 447 | .sess_get_index = ft_sess_get_index, | 446 | .sess_get_index = ft_sess_get_index, |
| 448 | .sess_get_initiator_sid = NULL, | 447 | .sess_get_initiator_sid = NULL, |
diff --git a/drivers/target/tcm_fc/tfc_sess.c b/drivers/target/tcm_fc/tfc_sess.c index d0c3e1894c61..f5186a744399 100644 --- a/drivers/target/tcm_fc/tfc_sess.c +++ b/drivers/target/tcm_fc/tfc_sess.c | |||
| @@ -303,18 +303,6 @@ static void ft_sess_delete_all(struct ft_tport *tport) | |||
| 303 | */ | 303 | */ |
| 304 | 304 | ||
| 305 | /* | 305 | /* |
| 306 | * Determine whether session is allowed to be shutdown in the current context. | ||
| 307 | * Returns non-zero if the session should be shutdown. | ||
| 308 | */ | ||
