Re: [PATCH 1/4] target: Prevent cmd->se_queue_node double add

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +	/* If the cmd is already on the list, remove it before we add it */
> +	if (!list_empty(&cmd->se_queue_node))
> +		list_del(&cmd->se_queue_node);
> +	else
> +		atomic_inc(&qobj->queue_cnt);
> +

This is not an overly useful comment, as it states the obvious, aka what
we are doing here.  It is much better to explain why the semingly
unexpected (re-adding the same cmd) might be valid under certain
circumstances.  Even better would be asserts that we only do it under
those circumstances.

--
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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux