X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=kernel%2Fdrivers%2Ftarget%2Ftcm_fc%2Ftfc_cmd.c;fp=kernel%2Fdrivers%2Ftarget%2Ftcm_fc%2Ftfc_cmd.c;h=064d6dfb5b6d9391bdd96f55ec4ae3f7d238655b;hb=e09b41010ba33a20a87472ee821fa407a5b8da36;hp=edcafa4490c0850bfc01115357ce4e817773ee72;hpb=f93b97fd65072de626c074dbe099a1fff05ce060;p=kvmfornfv.git diff --git a/kernel/drivers/target/tcm_fc/tfc_cmd.c b/kernel/drivers/target/tcm_fc/tfc_cmd.c index edcafa449..064d6dfb5 100644 --- a/kernel/drivers/target/tcm_fc/tfc_cmd.c +++ b/kernel/drivers/target/tcm_fc/tfc_cmd.c @@ -30,18 +30,12 @@ #include #include #include -#include -#include -#include -#include #include #include #include #include #include -#include -#include #include "tcm_fc.h" @@ -247,15 +241,6 @@ int ft_write_pending(struct se_cmd *se_cmd) return 0; } -u32 ft_get_task_tag(struct se_cmd *se_cmd) -{ - struct ft_cmd *cmd = container_of(se_cmd, struct ft_cmd, se_cmd); - - if (cmd->aborted) - return ~0; - return fc_seq_exch(cmd->seq)->rxid; -} - int ft_get_cmd_state(struct se_cmd *se_cmd) { return 0; @@ -269,7 +254,7 @@ static void ft_recv_seq(struct fc_seq *sp, struct fc_frame *fp, void *arg) struct ft_cmd *cmd = arg; struct fc_frame_header *fh; - if (unlikely(IS_ERR(fp))) { + if (IS_ERR(fp)) { /* XXX need to find cmd if queued */ cmd->seq = NULL; cmd->aborted = true; @@ -568,6 +553,7 @@ static void ft_send_work(struct work_struct *work) } fc_seq_exch(cmd->seq)->lp->tt.seq_set_resp(cmd->seq, ft_recv_seq, cmd); + cmd->se_cmd.tag = fc_seq_exch(cmd->seq)->rxid; /* * Use a single se_cmd->cmd_kref as we expect to release se_cmd * directly from ft_check_stop_free callback in response path.