Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276474
b: refs/heads/master
c: 410f670
h: refs/heads/master
v: v3
  • Loading branch information
Roland Dreier authored and Nicholas Bellinger committed Dec 6, 2011
1 parent bfaf6c1 commit ee6e6f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: 1c3d5794fc4a2afd2258b3aa6406377934a36663
refs/heads/master: 410f670202f0f13cdac8459b9c3effeeead135d1
9 changes: 8 additions & 1 deletion trunk/drivers/target/target_core_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -3770,8 +3770,15 @@ int transport_generic_new_cmd(struct se_cmd *cmd)
task_cdbs = transport_allocate_control_task(cmd);
}

if (task_cdbs <= 0)
if (task_cdbs < 0)
goto out_fail;
else if (!task_cdbs && (cmd->se_cmd_flags & SCF_SCSI_DATA_SG_IO_CDB)) {
cmd->t_state = TRANSPORT_COMPLETE;
atomic_set(&cmd->t_transport_active, 1);
INIT_WORK(&cmd->work, target_complete_ok_work);
queue_work(target_completion_wq, &cmd->work);
return 0;
}

if (set_counts) {
atomic_inc(&cmd->t_fe_count);
Expand Down

0 comments on commit ee6e6f7

Please sign in to comment.