Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286515
b: refs/heads/master
c: feae856
h: refs/heads/master
i:
  286513: 486f06d
  286511: cd29799
v: v3
  • Loading branch information
Jörn Engel authored and Nicholas Bellinger committed Dec 14, 2011
1 parent ef482f4 commit df46554
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c165f69c2ccbbb4ecf16c5d29d65922286bf62ff
refs/heads/master: feae85644f1460b3373ef5141183ee43e6191b58
26 changes: 10 additions & 16 deletions trunk/drivers/target/target_core_tmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ 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)
static int target_check_cdb_and_preempt(struct list_head *list,
struct se_cmd *cmd)
{
struct t10_pr_registration *pr_reg, *pr_reg_tmp;
struct t10_pr_registration *reg;

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)
if (!list)
return 0;
list_for_each_entry(reg, list, pr_reg_abort_list) {
if (reg->pr_res_key == cmd->pr_res_key)
return 0;
}

Expand Down Expand Up @@ -146,9 +146,7 @@ static void core_tmr_drain_tmr_list(
* parameter (eg: for PROUT PREEMPT_AND_ABORT service action
* skip non regisration key matching TMRs.
*/
if (preempt_and_abort_list &&
(core_scsi3_check_cdb_abort_and_preempt(
preempt_and_abort_list, cmd) != 0))
if (target_check_cdb_and_preempt(preempt_and_abort_list, cmd))
continue;

spin_lock(&cmd->t_state_lock);
Expand Down Expand Up @@ -225,9 +223,7 @@ static void core_tmr_drain_task_list(
* For PREEMPT_AND_ABORT usage, only process commands
* with a matching reservation key.
*/
if (preempt_and_abort_list &&
(core_scsi3_check_cdb_abort_and_preempt(
preempt_and_abort_list, cmd) != 0))
if (target_check_cdb_and_preempt(preempt_and_abort_list, cmd))
continue;
/*
* Not aborting PROUT PREEMPT_AND_ABORT CDB..
Expand Down Expand Up @@ -335,9 +331,7 @@ static void core_tmr_drain_cmd_list(
* For PREEMPT_AND_ABORT usage, only process commands
* with a matching reservation key.
*/
if (preempt_and_abort_list &&
(core_scsi3_check_cdb_abort_and_preempt(
preempt_and_abort_list, cmd) != 0))
if (target_check_cdb_and_preempt(preempt_and_abort_list, cmd))
continue;
/*
* Not aborting PROUT PREEMPT_AND_ABORT CDB..
Expand Down

0 comments on commit df46554

Please sign in to comment.