On Sun, Nov 16, 2008 at 09:29:05AM -0600, James Bottomley wrote: > 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. I think it wasn't a problem on the ISA drivers I changed. > > What about making it take a mask instead? That should always be known > by the driver. Ok. -Andi -- 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