diff options
author | Christoph Hellwig <hch@lst.de> | 2011-09-13 17:09:01 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-10-23 23:20:38 -0400 |
commit | 82f1c8a4e7739eae9f1c32c2c419efdc19b8af41 (patch) | |
tree | e4b9141c59cbc1402b96fb34003205fe90d362df /drivers/target/tcm_fc | |
parent | e6a2573f1f5d66f0456c433afdfc63f33fdf9008 (diff) |
target: push session reinstatement out of transport_generic_free_cmd
Push session reinstatement out of transport_generic_free_cmd into the only
caller that actually needs it. Clean up transport_generic_free_cmd a bit,
and remove the useless comment. I'd love to add a more useful kerneldoc
comment for it, but as this point I'm still a bit confused in where it
stands in the command release stack.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/tcm_fc')
-rw-r--r-- | drivers/target/tcm_fc/tfc_cmd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c index c2d148d80cf7..7f2ee5a0ed79 100644 --- a/drivers/target/tcm_fc/tfc_cmd.c +++ b/drivers/target/tcm_fc/tfc_cmd.c | |||
@@ -114,7 +114,7 @@ void ft_release_cmd(struct se_cmd *se_cmd) | |||
114 | 114 | ||
115 | void ft_check_stop_free(struct se_cmd *se_cmd) | 115 | void ft_check_stop_free(struct se_cmd *se_cmd) |
116 | { | 116 | { |
117 | transport_generic_free_cmd(se_cmd, 0, 0); | 117 | transport_generic_free_cmd(se_cmd, 0); |
118 | } | 118 | } |
119 | 119 | ||
120 | /* | 120 | /* |
@@ -269,7 +269,7 @@ static void ft_recv_seq(struct fc_seq *sp, struct fc_frame *fp, void *arg) | |||
269 | /* XXX need to find cmd if queued */ | 269 | /* XXX need to find cmd if queued */ |
270 | cmd->se_cmd.t_state = TRANSPORT_REMOVE; | 270 | cmd->se_cmd.t_state = TRANSPORT_REMOVE; |
271 | cmd->seq = NULL; | 271 | cmd->seq = NULL; |
272 | transport_generic_free_cmd(&cmd->se_cmd, 0, 0); | 272 | transport_generic_free_cmd(&cmd->se_cmd, 0); |
273 | return; | 273 | return; |
274 | } | 274 | } |
275 | 275 | ||
@@ -287,7 +287,7 @@ static void ft_recv_seq(struct fc_seq *sp, struct fc_frame *fp, void *arg) | |||
287 | __func__, fh->fh_r_ctl); | 287 | __func__, fh->fh_r_ctl); |
288 | ft_invl_hw_context(cmd); | 288 | ft_invl_hw_context(cmd); |
289 | fc_frame_free(fp); | 289 | fc_frame_free(fp); |
290 | transport_generic_free_cmd(&cmd->se_cmd, 0, 0); | 290 | transport_generic_free_cmd(&cmd->se_cmd, 0); |
291 | break; | 291 | break; |
292 | } | 292 | } |
293 | } | 293 | } |
@@ -420,7 +420,7 @@ static void ft_send_tm(struct ft_cmd *cmd) | |||
420 | sess = cmd->sess; | 420 | sess = cmd->sess; |
421 | transport_send_check_condition_and_sense(&cmd->se_cmd, | 421 | transport_send_check_condition_and_sense(&cmd->se_cmd, |
422 | cmd->se_cmd.scsi_sense_reason, 0); | 422 | cmd->se_cmd.scsi_sense_reason, 0); |
423 | transport_generic_free_cmd(&cmd->se_cmd, 0, 0); | 423 | transport_generic_free_cmd(&cmd->se_cmd, 0); |
424 | ft_sess_put(sess); | 424 | ft_sess_put(sess); |
425 | return; | 425 | return; |
426 | } | 426 | } |
@@ -627,7 +627,7 @@ static void ft_send_work(struct work_struct *work) | |||
627 | if (ret == -ENOMEM) { | 627 | if (ret == -ENOMEM) { |
628 | transport_send_check_condition_and_sense(se_cmd, | 628 | transport_send_check_condition_and_sense(se_cmd, |
629 | TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE, 0); | 629 | TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE, 0); |
630 | transport_generic_free_cmd(se_cmd, 0, 0); | 630 | transport_generic_free_cmd(se_cmd, 0); |
631 | return; | 631 | return; |
632 | } | 632 | } |
633 | if (ret == -EINVAL) { | 633 | if (ret == -EINVAL) { |
@@ -636,7 +636,7 @@ static void ft_send_work(struct work_struct *work) | |||
636 | else | 636 | else |
637 | transport_send_check_condition_and_sense(se_cmd, | 637 | transport_send_check_condition_and_sense(se_cmd, |
638 | se_cmd->scsi_sense_reason, 0); | 638 | se_cmd->scsi_sense_reason, 0); |
639 | transport_generic_free_cmd(se_cmd, 0, 0); | 639 | transport_generic_free_cmd(se_cmd, 0); |
640 | return; | 640 | return; |
641 | } | 641 | } |
642 | transport_handle_cdb_direct(se_cmd); | 642 | transport_handle_cdb_direct(se_cmd); |