diff options
author | Andy Grover <agrover@redhat.com> | 2012-01-19 16:39:14 -0500 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-02-25 17:37:47 -0500 |
commit | 4f26998a79b30a5c912cfa1a759fa0c3e6f6414e (patch) | |
tree | b69fd7ed5d387edb81364e29cf484eaae99d2f05 /drivers/target/iscsi | |
parent | ef28640497f5935bf614e1e29b16972d8b97cdb2 (diff) |
target/iscsi: Remove unneeded wrapper functions
iscsit_get_lun_for_{cmd,tmr} are unnecessary.
Signed-off-by: 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.c | 8 | ||||
-rw-r--r-- | drivers/target/iscsi/iscsi_target_device.c | 19 | ||||
-rw-r--r-- | drivers/target/iscsi/iscsi_target_device.h | 2 |
3 files changed, 4 insertions, 25 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index bf0e8e75a272..cecf951e420f 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c | |||
@@ -1006,8 +1006,8 @@ done: | |||
1006 | /* | 1006 | /* |
1007 | * The CDB is going to an se_device_t. | 1007 | * The CDB is going to an se_device_t. |
1008 | */ | 1008 | */ |
1009 | ret = iscsit_get_lun_for_cmd(cmd, hdr->cdb, | 1009 | ret = transport_lookup_cmd_lun(&cmd->se_cmd, |
1010 | get_unaligned_le64(&hdr->lun)); | 1010 | scsilun_to_int(&hdr->lun)); |
1011 | if (ret < 0) { | 1011 | if (ret < 0) { |
1012 | if (cmd->se_cmd.scsi_sense_reason == TCM_NON_EXISTENT_LUN) { | 1012 | if (cmd->se_cmd.scsi_sense_reason == TCM_NON_EXISTENT_LUN) { |
1013 | pr_debug("Responding to non-acl'ed," | 1013 | pr_debug("Responding to non-acl'ed," |
@@ -1746,8 +1746,8 @@ static int iscsit_handle_task_mgt_cmd( | |||
1746 | * Locate the struct se_lun for all TMRs not related to ERL=2 TASK_REASSIGN | 1746 | * Locate the struct se_lun for all TMRs not related to ERL=2 TASK_REASSIGN |
1747 | */ | 1747 | */ |
1748 | if (function != ISCSI_TM_FUNC_TASK_REASSIGN) { | 1748 | if (function != ISCSI_TM_FUNC_TASK_REASSIGN) { |
1749 | ret = iscsit_get_lun_for_tmr(cmd, | 1749 | ret = transport_lookup_tmr_lun(&cmd->se_cmd, |
1750 | get_unaligned_le64(&hdr->lun)); | 1750 | scsilun_to_int(&hdr->lun)); |
1751 | if (ret < 0) { | 1751 | if (ret < 0) { |
1752 | cmd->se_cmd.se_cmd_flags |= SCF_SCSI_CDB_EXCEPTION; | 1752 | cmd->se_cmd.se_cmd_flags |= SCF_SCSI_CDB_EXCEPTION; |
1753 | se_tmr->response = ISCSI_TMF_RSP_NO_LUN; | 1753 | se_tmr->response = ISCSI_TMF_RSP_NO_LUN; |
diff --git a/drivers/target/iscsi/iscsi_target_device.c b/drivers/target/iscsi/iscsi_target_device.c index f63ea35bc4ae..bcc409853a67 100644 --- a/drivers/target/iscsi/iscsi_target_device.c +++ b/drivers/target/iscsi/iscsi_target_device.c | |||
@@ -28,25 +28,6 @@ | |||
28 | #include "iscsi_target_tpg.h" | 28 | #include "iscsi_target_tpg.h" |
29 | #include "iscsi_target_util.h" | 29 | #include "iscsi_target_util.h" |
30 | 30 | ||
31 | int iscsit_get_lun_for_tmr( | ||
32 | struct iscsi_cmd *cmd, | ||
33 | u64 lun) | ||
34 | { | ||
35 | u32 unpacked_lun = scsilun_to_int((struct scsi_lun *)&lun); | ||
36 | |||
37 | return transport_lookup_tmr_lun(&cmd->se_cmd, unpacked_lun); | ||
38 | } | ||
39 | |||
40 | int iscsit_get_lun_for_cmd( | ||
41 | struct iscsi_cmd *cmd, | ||
42 | unsigned char *cdb, | ||
43 | u64 lun) | ||
44 | { | ||
45 | u32 unpacked_lun = scsilun_to_int((struct scsi_lun *)&lun); | ||
46 | |||
47 | return transport_lookup_cmd_lun(&cmd->se_cmd, unpacked_lun); | ||
48 | } | ||
49 | |||
50 | void iscsit_determine_maxcmdsn(struct iscsi_session *sess) | 31 | void iscsit_determine_maxcmdsn(struct iscsi_session *sess) |
51 | { | 32 | { |
52 | struct se_node_acl *se_nacl; | 33 | struct se_node_acl *se_nacl; |
diff --git a/drivers/target/iscsi/iscsi_target_device.h b/drivers/target/iscsi/iscsi_target_device.h index bef1cada15f8..a0e2df9e8090 100644 --- a/drivers/target/iscsi/iscsi_target_device.h +++ b/drivers/target/iscsi/iscsi_target_device.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef ISCSI_TARGET_DEVICE_H | 1 | #ifndef ISCSI_TARGET_DEVICE_H |
2 | #define ISCSI_TARGET_DEVICE_H | 2 | #define ISCSI_TARGET_DEVICE_H |
3 | 3 | ||
4 | extern int iscsit_get_lun_for_tmr(struct iscsi_cmd *, u64); | ||
5 | extern int iscsit_get_lun_for_cmd(struct iscsi_cmd *, unsigned char *, u64); | ||
6 | extern void iscsit_determine_maxcmdsn(struct iscsi_session *); | 4 | extern void iscsit_determine_maxcmdsn(struct iscsi_session *); |
7 | extern void iscsit_increment_maxcmdsn(struct iscsi_cmd *, struct iscsi_session *); | 5 | extern void iscsit_increment_maxcmdsn(struct iscsi_cmd *, struct iscsi_session *); |
8 | 6 | ||