diff options
author | Joern Engel <joern@logfs.org> | 2013-05-15 03:44:07 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-05-21 00:44:10 -0400 |
commit | be646c2d2ba8e2e56596d72633705f8286698c25 (patch) | |
tree | d5a25c357343750556fc40d71f2c70b4db980792 /drivers | |
parent | c7788792a5e7b0d5d7f96d0766b4cb6112d47d75 (diff) |
target: Remove unused wait_for_tasks bit in target_wait_for_sess_cmds
Drop unused transport_wait_for_tasks() check in target_wait_for_sess_cmds
shutdown code, and convert tcm_qla2xxx + ib_srpt fabric drivers.
Cc: Joern Engel <joern@logfs.org>
Cc: Roland Dreier <roland@kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/ulp/srpt/ib_srpt.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 | ||||
-rw-r--r-- | drivers/target/target_core_transport.c | 28 |
3 files changed, 7 insertions, 25 deletions
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index b08ca7a9f76b..564024e0123a 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c | |||
@@ -2328,7 +2328,7 @@ static void srpt_release_channel_work(struct work_struct *w) | |||
2328 | se_sess = ch->sess; | 2328 | se_sess = ch->sess; |
2329 | BUG_ON(!se_sess); | 2329 | BUG_ON(!se_sess); |
2330 | 2330 | ||
2331 | target_wait_for_sess_cmds(se_sess, 0); | 2331 | target_wait_for_sess_cmds(se_sess); |
2332 | 2332 | ||
2333 | transport_deregister_session_configfs(se_sess); | 2333 | transport_deregister_session_configfs(se_sess); |
2334 | transport_deregister_session(se_sess); | 2334 | transport_deregister_session(se_sess); |
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index d182c96e17ea..7a3870f385f6 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c | |||
@@ -1370,7 +1370,7 @@ static void tcm_qla2xxx_free_session(struct qla_tgt_sess *sess) | |||
1370 | dump_stack(); | 1370 | dump_stack(); |
1371 | return; | 1371 | return; |
1372 | } | 1372 | } |
1373 | target_wait_for_sess_cmds(se_sess, 0); | 1373 | target_wait_for_sess_cmds(se_sess); |
1374 | 1374 | ||
1375 | transport_deregister_session_configfs(sess->se_sess); | 1375 | transport_deregister_session_configfs(sess->se_sess); |
1376 | transport_deregister_session(sess->se_sess); | 1376 | transport_deregister_session(sess->se_sess); |
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 4a793362309d..311c11349aab 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c | |||
@@ -2263,14 +2263,10 @@ EXPORT_SYMBOL(target_sess_cmd_list_set_waiting); | |||
2263 | 2263 | ||
2264 | /* target_wait_for_sess_cmds - Wait for outstanding descriptors | 2264 | /* target_wait_for_sess_cmds - Wait for outstanding descriptors |
2265 | * @se_sess: session to wait for active I/O | 2265 | * @se_sess: session to wait for active I/O |
2266 | * @wait_for_tasks: Make extra transport_wait_for_tasks call | ||
2267 | */ | 2266 | */ |
2268 | void target_wait_for_sess_cmds( | 2267 | void target_wait_for_sess_cmds(struct se_session *se_sess) |
2269 | struct se_session *se_sess, | ||
2270 | int wait_for_tasks) | ||
2271 | { | 2268 | { |
2272 | struct se_cmd *se_cmd, *tmp_cmd; | 2269 | struct se_cmd *se_cmd, *tmp_cmd; |
2273 | bool rc = false; | ||
2274 | 2270 | ||
2275 | list_for_each_entry_safe(se_cmd, tmp_cmd, | 2271 | list_for_each_entry_safe(se_cmd, tmp_cmd, |
2276 | &se_sess->sess_cmd_list, se_cmd_list) { | 2272 | &se_sess->sess_cmd_list, se_cmd_list) { |
@@ -2280,24 +2276,10 @@ void target_wait_for_sess_cmds( | |||
2280 | " %d\n", se_cmd, se_cmd->t_state, | 2276 | " %d\n", se_cmd, se_cmd->t_state, |
2281 | se_cmd->se_tfo->get_cmd_state(se_cmd)); | 2277 | se_cmd->se_tfo->get_cmd_state(se_cmd)); |
2282 | 2278 | ||
2283 | if (wait_for_tasks) { | 2279 | wait_for_completion(&se_cmd->cmd_wait_comp); |
2284 | pr_debug("Calling transport_wait_for_tasks se_cmd: %p t_state: %d," | 2280 | pr_debug("After cmd_wait_comp: se_cmd: %p t_state: %d" |
2285 | " fabric state: %d\n", se_cmd, se_cmd->t_state, | 2281 | " fabric state: %d\n", se_cmd, se_cmd->t_state, |
2286 | se_cmd->se_tfo->get_cmd_state(se_cmd)); | 2282 | se_cmd->se_tfo->get_cmd_state(se_cmd)); |
2287 | |||
2288 | rc = transport_wait_for_tasks(se_cmd); | ||
2289 | |||
2290 | pr_debug("After transport_wait_for_tasks se_cmd: %p t_state: %d," | ||
2291 | " fabric state: %d\n", se_cmd, se_cmd->t_state, | ||
2292 | se_cmd->se_tfo->get_cmd_state(se_cmd)); | ||
2293 | } | ||
2294 | |||
2295 | if (!rc) { | ||
2296 | wait_for_completion(&se_cmd->cmd_wait_comp); | ||
2297 | pr_debug("After cmd_wait_comp: se_cmd: %p t_state: %d" | ||
2298 | " fabric state: %d\n", se_cmd, se_cmd->t_state, | ||
2299 | se_cmd->se_tfo->get_cmd_state(se_cmd)); | ||
2300 | } | ||
2301 | 2283 | ||
2302 | se_cmd->se_tfo->release_cmd(se_cmd); | 2284 | se_cmd->se_tfo->release_cmd(se_cmd); |
2303 | } | 2285 | } |