Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344749
b: refs/heads/master
c: d9ed694
h: refs/heads/master
i:
  344747: 9cb5975
v: v3
  • Loading branch information
Roland Dreier authored and Nicholas Bellinger committed Nov 28, 2012
1 parent 374825c commit 53ce791
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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: 06e97b489006f28e23bb028febfa1c01c266d676
refs/heads/master: d9ed69473a345d69cf15831e8db22f159b13cdd2
9 changes: 4 additions & 5 deletions trunk/drivers/target/target_core_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1966,9 +1966,10 @@ static void transport_put_cmd(struct se_cmd *cmd)
unsigned long flags;

spin_lock_irqsave(&cmd->t_state_lock, flags);
if (atomic_read(&cmd->t_fe_count)) {
if (!atomic_dec_and_test(&cmd->t_fe_count))
goto out_busy;
if (atomic_read(&cmd->t_fe_count) &&
!atomic_dec_and_test(&cmd->t_fe_count)) {
spin_unlock_irqrestore(&cmd->t_state_lock, flags);
return;
}

if (cmd->transport_state & CMD_T_DEV_ACTIVE) {
Expand All @@ -1980,8 +1981,6 @@ static void transport_put_cmd(struct se_cmd *cmd)
transport_free_pages(cmd);
transport_release_cmd(cmd);
return;
out_busy:
spin_unlock_irqrestore(&cmd->t_state_lock, flags);
}

void *transport_kmap_data_sg(struct se_cmd *cmd)
Expand Down

0 comments on commit 53ce791

Please sign in to comment.