summaryrefslogtreecommitdiffstats
path: root/drivers/target/tcm_fc
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2012-01-19 13:39:17 -0800
committerNicholas Bellinger <nab@linux-iscsi.org>2012-02-25 14:37:47 -0800
commitc8e31f26feeb03dc6f51bff68135cc58431e099b (patch)
tree8d584fcb7cb7a58988cd2463a9a26f577410e6ac /drivers/target/tcm_fc
parent35b2cdc4fea1f0d13e1602c07e62c797c9fe5ed4 (diff)
downloadtalos-op-linux-c8e31f26feeb03dc6f51bff68135cc58431e099b.tar.gz
talos-op-linux-c8e31f26feeb03dc6f51bff68135cc58431e099b.zip
target: Add SCF_SCSI_TMR_CDB usage and drop se_tmr_req_cache
Change the test for if a cmd is a tmr request to checking if SCF_SCSI_TMR_CDB (a new flag) is set in cmd->se_cmd_flags. Also remove se_tmr_req_cache usage in favor of kzalloc usage, and make core_tmr_alloc_req() return int + setup se_cmd->se_tmr_req directly and fix up various fabric module usages Cc: Andy Grover <agrover@redhat.com> 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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c
index a76661178d6b..bdf25593b81c 100644
--- a/drivers/target/tcm_fc/tfc_cmd.c
+++ b/drivers/target/tcm_fc/tfc_cmd.c
@@ -356,6 +356,7 @@ static void ft_send_tm(struct ft_cmd *cmd)
struct se_tmr_req *tmr;
struct fcp_cmnd *fcp;
struct ft_sess *sess;
+ int rc;
u8 tm_func;
transport_init_se_cmd(&cmd->se_cmd, &ft_configfs->tf_ops,
@@ -392,13 +393,12 @@ static void ft_send_tm(struct ft_cmd *cmd)
}
pr_debug("alloc tm cmd fn %d\n", tm_func);
- tmr = core_tmr_alloc_req(&cmd->se_cmd, cmd, tm_func, GFP_KERNEL);
- if (!tmr) {
+ rc = core_tmr_alloc_req(&cmd->se_cmd, cmd, tm_func, GFP_KERNEL);
+ if (rc < 0) {
pr_debug("alloc failed\n");
ft_send_resp_code_and_free(cmd, FCP_TMF_FAILED);
return;
}
- cmd->se_cmd.se_tmr_req = tmr;
switch (fcp->fc_tm_flags) {
case FCP_TMF_LUN_RESET:
OpenPOWER on IntegriCloud