diff options
author | Andy Grover <agrover@redhat.com> | 2012-01-20 01:39:17 +0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-02-26 02:37:47 +0400 |
commit | c8e31f26feeb03dc6f51bff68135cc58431e099b (patch) | |
tree | 8d584fcb7cb7a58988cd2463a9a26f577410e6ac /drivers/target/iscsi | |
parent | 35b2cdc4fea1f0d13e1602c07e62c797c9fe5ed4 (diff) | |
download | linux-c8e31f26feeb03dc6f51bff68135cc58431e099b.tar.xz |
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/iscsi')
-rw-r--r-- | drivers/target/iscsi/iscsi_target_util.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/target/iscsi/iscsi_target_util.c b/drivers/target/iscsi/iscsi_target_util.c index 11287e1ece13..4eba86d2bd82 100644 --- a/drivers/target/iscsi/iscsi_target_util.c +++ b/drivers/target/iscsi/iscsi_target_util.c @@ -229,6 +229,7 @@ struct iscsi_cmd *iscsit_allocate_se_cmd_for_tmr( { struct iscsi_cmd *cmd; struct se_cmd *se_cmd; + int rc; u8 tcm_function; cmd = iscsit_allocate_cmd(conn, GFP_KERNEL); @@ -286,10 +287,8 @@ struct iscsi_cmd *iscsit_allocate_se_cmd_for_tmr( goto out; } - se_cmd->se_tmr_req = core_tmr_alloc_req(se_cmd, - cmd->tmr_req, tcm_function, - GFP_KERNEL); - if (!se_cmd->se_tmr_req) + rc = core_tmr_alloc_req(se_cmd, cmd->tmr_req, tcm_function, GFP_KERNEL); + if (rc < 0) goto out; cmd->tmr_req->se_tmr_req = se_cmd->se_tmr_req; |