On Wed, 2015-05-13 at 09:19 +0200, Bart Van Assche wrote: > Code like " &= ~CMD_T_BUSY | ..." only clears CMD_T_BUSY but not > the other flag. Modify these statements such that both flags are > cleared. > > Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx> > --- > 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 f7ab818..e00f241 100644 > --- a/drivers/target/target_core_transport.c > +++ b/drivers/target/target_core_transport.c > @@ -1766,7 +1766,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; > @@ -1863,7 +1863,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; > } Nice catch. Applied to target-pending/master. Thanks Bart! -- 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