> if (dev) { > spin_lock_irqsave(&dev->se_tmr_lock, flags); > - list_del(&tmr->tmr_list); > + if (!list_empty(&tmr->tmr_list)) > + list_del_init(&tmr->tmr_list); list_del_init on a empty list is fine. > + sess = cmd->se_sess; > + if (!sess) { > + dump_stack(); > + continue; > + } Why not something like: if (WARN_ON_ONCE(!sess)) continue; same for the previous patch. > + spin_lock(&sess->sess_cmd_lock); > + rc = kref_get_unless_zero(&cmd->cmd_kref); > + spin_unlock(&sess->sess_cmd_lock); no need to take a lock around kref_get_unless_zero, it's not going to help with anything. -- 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