Merge branch 'drm-fixes-4.3' of git://people.freedesktop.org/~agd5f/linux into drm...
[firefly-linux-kernel-4.4.55.git] / drivers / target / tcm_fc / tfc_cmd.c
index 1bf78e7c994c8ef7ec3ecc58cbd7b6a2e3dfa782..aa3caca8bace13dc29a8cd9cb01d5b252b5c8a6c 100644 (file)
@@ -36,7 +36,6 @@
 
 #include <target/target_core_base.h>
 #include <target/target_core_fabric.h>
-#include <target/target_core_configfs.h>
 #include <target/configfs_macros.h>
 
 #include "tcm_fc.h"
@@ -243,15 +242,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;
@@ -265,7 +255,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;
@@ -564,6 +554,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.