Re: [PATCH 3/3] megaraid_sas: Convert SHT->queuecommand() to run host_lock-less

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

 



On Sat, Nov 27, 2010 at 11:17:36PM -0800, Nicholas A. Bellinger wrote:
>  /**
> - * megasas_get_cmd -	Get a command from the free pool
> + * __megasas_get_cmd -	Get a command from the free pool
>   * @instance:		Adapter soft state
>   *
>   * Returns a free command from the pool
> + * Locking: Called with instance->cmd_pool_lock w/ spin_lock_irqsave
>   */
> -static struct megasas_cmd *megasas_get_cmd(struct megasas_instance
> -						  *instance)
> +static struct megasas_cmd *
> +__megasas_get_cmd(struct megasas_instance *instance)
>  {
> +	struct megasas_cmd *cmd;
>  	unsigned long flags;
> -	struct megasas_cmd *cmd = NULL;
>  
>  	spin_lock_irqsave(&instance->cmd_pool_lock, flags);

--- snip ---

> +static struct megasas_cmd *
> +megasas_get_cmd(struct megasas_instance *instance)
> +{
> +	struct megasas_cmd *cmd;
> +	unsigned long flags;
> +
> +	spin_lock_irqsave(&instance->cmd_pool_lock, flags);

I can't see how this works.

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