Re: [PATCH 1/2] target: Add transport_handle_cdb_direct optimization

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

 



> + */
> +int transport_handle_cdb_direct(
> +	struct se_cmd *cmd)
> +{
> +	if (!cmd->se_lun) {
> +		dump_stack();
> +		printk(KERN_ERR "cmd->se_lun is NULL\n");
> +		return -EINVAL;
> +	}
> +	if (in_interrupt()) {
> +		dump_stack();
> +		printk(KERN_ERR "transport_generic_handle_cdb cannot be called"
> +				" from interrupt context\n");
> +		return -EINVAL;
> +	}
> +
> +	return transport_generic_new_cmd(cmd);

I can't really see any reason to add this helper.  It just adds rather
pointless debug checks for cases that already will blow up "properly" with
the current code.  Let's keep the callchain lean and just leave it out.

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