target: Remove unused wait_for_tasks bit in target_wait_for_sess_cmds
authorJoern Engel <joern@logfs.org>
Wed, 15 May 2013 07:44:07 +0000 (00:44 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 21 May 2013 04:44:10 +0000 (21:44 -0700)
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>
drivers/infiniband/ulp/srpt/ib_srpt.c
drivers/scsi/qla2xxx/tcm_qla2xxx.c
drivers/target/target_core_transport.c
include/target/target_core_fabric.h

index b08ca7a9f76bf8ea70f63bfd6c291d4d71b5814d..564024e0123af620da28b0b65fbcfd02e669a353 100644 (file)
@@ -2328,7 +2328,7 @@ static void srpt_release_channel_work(struct work_struct *w)
        se_sess = ch->sess;
        BUG_ON(!se_sess);
 
-       target_wait_for_sess_cmds(se_sess, 0);
+       target_wait_for_sess_cmds(se_sess);
 
        transport_deregister_session_configfs(se_sess);
        transport_deregister_session(se_sess);
index d182c96e17ea48ef0427a67c461d8e9bc828b5c2..7a3870f385f63adcc7ed23db355af7fe0682fb93 100644 (file)
@@ -1370,7 +1370,7 @@ static void tcm_qla2xxx_free_session(struct qla_tgt_sess *sess)
                dump_stack();
                return;
        }
-       target_wait_for_sess_cmds(se_sess, 0);
+       target_wait_for_sess_cmds(se_sess);
 
        transport_deregister_session_configfs(sess->se_sess);
        transport_deregister_session(sess->se_sess);
index 4a793362309d7204f69596c3e7d0ed0aee625307..311c11349aab4f6350aad27657ce41103915aed6 100644 (file)
@@ -2263,14 +2263,10 @@ EXPORT_SYMBOL(target_sess_cmd_list_set_waiting);
 
 /* target_wait_for_sess_cmds - Wait for outstanding descriptors
  * @se_sess:    session to wait for active I/O
- * @wait_for_tasks:    Make extra transport_wait_for_tasks call
  */
-void target_wait_for_sess_cmds(
-       struct se_session *se_sess,
-       int wait_for_tasks)
+void target_wait_for_sess_cmds(struct se_session *se_sess)
 {
        struct se_cmd *se_cmd, *tmp_cmd;
-       bool rc = false;
 
        list_for_each_entry_safe(se_cmd, tmp_cmd,
                                &se_sess->sess_cmd_list, se_cmd_list) {
@@ -2280,24 +2276,10 @@ void target_wait_for_sess_cmds(
                        " %d\n", se_cmd, se_cmd->t_state,
                        se_cmd->se_tfo->get_cmd_state(se_cmd));
 
-               if (wait_for_tasks) {
-                       pr_debug("Calling transport_wait_for_tasks se_cmd: %p t_state: %d,"
-                               " fabric state: %d\n", se_cmd, se_cmd->t_state,
-                               se_cmd->se_tfo->get_cmd_state(se_cmd));
-
-                       rc = transport_wait_for_tasks(se_cmd);
-
-                       pr_debug("After transport_wait_for_tasks se_cmd: %p t_state: %d,"
-                               " fabric state: %d\n", se_cmd, se_cmd->t_state,
-                               se_cmd->se_tfo->get_cmd_state(se_cmd));
-               }
-
-               if (!rc) {
-                       wait_for_completion(&se_cmd->cmd_wait_comp);
-                       pr_debug("After cmd_wait_comp: se_cmd: %p t_state: %d"
-                               " fabric state: %d\n", se_cmd, se_cmd->t_state,
-                               se_cmd->se_tfo->get_cmd_state(se_cmd));
-               }
+               wait_for_completion(&se_cmd->cmd_wait_comp);
+               pr_debug("After cmd_wait_comp: se_cmd: %p t_state: %d"
+                       " fabric state: %d\n", se_cmd, se_cmd->t_state,
+                       se_cmd->se_tfo->get_cmd_state(se_cmd));
 
                se_cmd->se_tfo->release_cmd(se_cmd);
        }
index ba3471b73c07557d91411d9d6b3367e356962096..8a26f0d55fd123a8cac132246ab82f450ec4d8ea 100644 (file)
@@ -123,7 +123,7 @@ int transport_send_check_condition_and_sense(struct se_cmd *,
 int    target_get_sess_cmd(struct se_session *, struct se_cmd *, bool);
 int    target_put_sess_cmd(struct se_session *, struct se_cmd *);
 void   target_sess_cmd_list_set_waiting(struct se_session *);
-void   target_wait_for_sess_cmds(struct se_session *, int);
+void   target_wait_for_sess_cmds(struct se_session *);
 
 int    core_alua_check_nonop_delay(struct se_cmd *);