Re: [PATCH] [3/21] Pass gfp to scsi_allocate_command

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

 



On Sun, 2008-11-16 at 00:11 +0100, Andi Kleen wrote:
> -static void scsi_put_host_cmd_pool(gfp_t gfp_mask)
> +static void scsi_put_host_cmd_pool(struct Scsi_Host *shost)
>  {
>         struct scsi_host_cmd_pool *pool;
>  
>         mutex_lock(&host_cmd_pool_mutex);
> -       pool = (gfp_mask & __GFP_DMA) ? &scsi_cmd_dma_pool :
> +       pool = (shost && shost->unchecked_isa_dma) ?
> &scsi_cmd_dma_pool :
>                 &scsi_cmd_pool;

There's a conceptual problem with this:  The API is designed to be used
on host setup (i.e. when allocating a host based command for the driver)
so the scsi_host may not be available (or at least not fully set up)
when this is called.

What about making it take a mask instead?  That should always be known
by the driver.

James


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