Hi Akinobu, Apologies for the delayed response. Comments are below. On Fri, 2015-05-22 at 08:41 +0900, Akinobu Mita wrote: > CMD_T_SENT flag on se_cmd->transport_state is considered to be cleared > when the command is failed or delayed. But it is not cleared in some > places due to the lack of parenthesis. > > Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx> > Cc: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> > Cc: target-devel@xxxxxxxxxxxxxxx > --- > drivers/target/target_core_transport.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c > index 1947e67..446affb 100644 > --- a/drivers/target/target_core_transport.c > +++ b/drivers/target/target_core_transport.c > @@ -1771,7 +1771,7 @@ static int target_write_prot_action(struct se_cmd *cmd) > sectors, 0, cmd->t_prot_sg, 0); > if (unlikely(cmd->pi_err)) { > spin_lock_irq(&cmd->t_state_lock); > - cmd->transport_state &= ~CMD_T_BUSY|CMD_T_SENT; > + cmd->transport_state &= ~(CMD_T_BUSY|CMD_T_SENT); > spin_unlock_irq(&cmd->t_state_lock); > transport_generic_request_failure(cmd, cmd->pi_err); > return -1; > @@ -1869,7 +1869,7 @@ void target_execute_cmd(struct se_cmd *cmd) > > if (target_handle_task_attr(cmd)) { > spin_lock_irq(&cmd->t_state_lock); > - cmd->transport_state &= ~CMD_T_BUSY|CMD_T_SENT; > + cmd->transport_state &= ~(CMD_T_BUSY|CMD_T_SENT); > spin_unlock_irq(&cmd->t_state_lock); > return; > } This was reported earlier by Bart, and the bugfix is currently queued for v4.1-rc6 code here: https://git.kernel.org/cgit/linux/kernel/git/nab/target-pending.git/commit/?id=6c2faeaa0ecc67098106771cba8b7ed1e99a1b5f Thank you for reporting. --nab -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html