diff options
author | Jörn Engel <joern@logfs.org> | 2011-11-23 20:04:42 -0500 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-12-14 06:27:34 -0500 |
commit | c165f69c2ccbbb4ecf16c5d29d65922286bf62ff (patch) | |
tree | 2899166c0d1354cb37346c6b4d8b417f60a55c21 /drivers | |
parent | 90c161b643d9531d271110876a14e68b49172d8a (diff) |
target: Move core_scsi3_check_cdb_abort_and_preempt
And make it static afterwards.
Signed-off-by: Joern Engel <joern@logfs.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/target/target_core_pr.c | 15 | ||||
-rw-r--r-- | drivers/target/target_core_pr.h | 2 | ||||
-rw-r--r-- | drivers/target/target_core_tmr.c | 15 |
3 files changed, 15 insertions, 17 deletions
diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c index d2b73b3f4e6c..429ad7291664 100644 --- a/drivers/target/target_core_pr.c +++ b/drivers/target/target_core_pr.c | |||
@@ -2981,21 +2981,6 @@ static void core_scsi3_release_preempt_and_abort( | |||
2981 | } | 2981 | } |
2982 | } | 2982 | } |
2983 | 2983 | ||
2984 | int core_scsi3_check_cdb_abort_and_preempt( | ||
2985 | struct list_head *preempt_and_abort_list, | ||
2986 | struct se_cmd *cmd) | ||
2987 | { | ||
2988 | struct t10_pr_registration *pr_reg, *pr_reg_tmp; | ||
2989 | |||
2990 | list_for_each_entry_safe(pr_reg, pr_reg_tmp, preempt_and_abort_list, | ||
2991 | pr_reg_abort_list) { | ||
2992 | if (pr_reg->pr_res_key == cmd->pr_res_key) | ||
2993 | return 0; | ||
2994 | } | ||
2995 | |||
2996 | return 1; | ||
2997 | } | ||
2998 | |||
2999 | static int core_scsi3_pro_preempt( | 2984 | static int core_scsi3_pro_preempt( |
3000 | struct se_cmd *cmd, | 2985 | struct se_cmd *cmd, |
3001 | int type, | 2986 | int type, |
diff --git a/drivers/target/target_core_pr.h b/drivers/target/target_core_pr.h index b97f6940dd05..7a233feb7e99 100644 --- a/drivers/target/target_core_pr.h +++ b/drivers/target/target_core_pr.h | |||
@@ -60,8 +60,6 @@ extern void core_scsi3_free_pr_reg_from_nacl(struct se_device *, | |||
60 | struct se_node_acl *); | 60 | struct se_node_acl *); |
61 | extern void core_scsi3_free_all_registrations(struct se_device *); | 61 | extern void core_scsi3_free_all_registrations(struct se_device *); |
62 | extern unsigned char *core_scsi3_pr_dump_type(int); | 62 | extern unsigned char *core_scsi3_pr_dump_type(int); |
63 | extern int core_scsi3_check_cdb_abort_and_preempt(struct list_head *, | ||
64 | struct se_cmd *); | ||
65 | 63 | ||
66 | extern int target_scsi3_emulate_pr_in(struct se_task *task); | 64 | extern int target_scsi3_emulate_pr_in(struct se_task *task); |
67 | extern int target_scsi3_emulate_pr_out(struct se_task *task); | 65 | extern int target_scsi3_emulate_pr_out(struct se_task *task); |
diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c index b4c9bb783c46..22cefeb544bd 100644 --- a/drivers/target/target_core_tmr.c +++ b/drivers/target/target_core_tmr.c | |||
@@ -100,6 +100,21 @@ static void core_tmr_handle_tas_abort( | |||
100 | transport_cmd_finish_abort(cmd, 0); | 100 | transport_cmd_finish_abort(cmd, 0); |
101 | } | 101 | } |
102 | 102 | ||
103 | static int core_scsi3_check_cdb_abort_and_preempt( | ||
104 | struct list_head *preempt_and_abort_list, | ||
105 | struct se_cmd *cmd) | ||
106 | { | ||
107 | struct t10_pr_registration *pr_reg, *pr_reg_tmp; | ||
108 | |||
109 | list_for_each_entry_safe(pr_reg, pr_reg_tmp, preempt_and_abort_list, | ||
110 | pr_reg_abort_list) { | ||
111 | if (pr_reg->pr_res_key == cmd->pr_res_key) | ||
112 | return 0; | ||
113 | } | ||
114 | |||
115 | return 1; | ||
116 | } | ||
117 | |||
103 | static void core_tmr_drain_tmr_list( | 118 | static void core_tmr_drain_tmr_list( |
104 | struct se_device *dev, | 119 | struct se_device *dev, |
105 | struct se_tmr_req *tmr, | 120 | struct se_tmr_req *tmr, |