target: Move core_scsi3_check_cdb_abort_and_preempt
authorJörn Engel <joern@logfs.org>
Thu, 24 Nov 2011 01:04:42 +0000 (02:04 +0100)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 14 Dec 2011 11:27:34 +0000 (11:27 +0000)
And make it static afterwards.

Signed-off-by: Joern Engel <joern@logfs.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_pr.c
drivers/target/target_core_pr.h
drivers/target/target_core_tmr.c

index d2b73b3f4e6c6972532e941c967da4d601c83577..429ad7291664382dc0f73c38a833fa29ab132632 100644 (file)
@@ -2981,21 +2981,6 @@ static void core_scsi3_release_preempt_and_abort(
        }
 }
 
-int core_scsi3_check_cdb_abort_and_preempt(
-       struct list_head *preempt_and_abort_list,
-       struct se_cmd *cmd)
-{
-       struct t10_pr_registration *pr_reg, *pr_reg_tmp;
-
-       list_for_each_entry_safe(pr_reg, pr_reg_tmp, preempt_and_abort_list,
-                               pr_reg_abort_list) {
-               if (pr_reg->pr_res_key == cmd->pr_res_key)
-                       return 0;
-       }
-
-       return 1;
-}
-
 static int core_scsi3_pro_preempt(
        struct se_cmd *cmd,
        int type,
index b97f6940dd051a9e6c18e1842d0626af3a60ebbc..7a233feb7e992a30502ea4b43368214eb8f269ff 100644 (file)
@@ -60,8 +60,6 @@ extern void core_scsi3_free_pr_reg_from_nacl(struct se_device *,
                                             struct se_node_acl *);
 extern void core_scsi3_free_all_registrations(struct se_device *);
 extern unsigned char *core_scsi3_pr_dump_type(int);
-extern int core_scsi3_check_cdb_abort_and_preempt(struct list_head *,
-                                                 struct se_cmd *);
 
 extern int target_scsi3_emulate_pr_in(struct se_task *task);
 extern int target_scsi3_emulate_pr_out(struct se_task *task);
index b4c9bb783c46115b63575a525f25ce82cf2258b3..22cefeb544bd29be590cac6cfaa1574a597f6774 100644 (file)
@@ -100,6 +100,21 @@ static void core_tmr_handle_tas_abort(
        transport_cmd_finish_abort(cmd, 0);
 }
 
+static int core_scsi3_check_cdb_abort_and_preempt(
+       struct list_head *preempt_and_abort_list,
+       struct se_cmd *cmd)
+{
+       struct t10_pr_registration *pr_reg, *pr_reg_tmp;
+
+       list_for_each_entry_safe(pr_reg, pr_reg_tmp, preempt_and_abort_list,
+                               pr_reg_abort_list) {
+               if (pr_reg->pr_res_key == cmd->pr_res_key)
+                       return 0;
+       }
+
+       return 1;
+}
+
 static void core_tmr_drain_tmr_list(
        struct se_device *dev,
        struct se_tmr_req *tmr,