From: Roland Dreier <roland@xxxxxxxxxxxxxxx> No need to have a goto where a return is clearer. Signed-off-by: Roland Dreier <roland@xxxxxxxxxxxxxxx> --- drivers/target/target_core_transport.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index dcecbfb..0f29d70 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -2183,9 +2183,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) { @@ -2196,9 +2197,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); } /* -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html