[PATCH] [2/7] Convert open coded reference in libata to q->bounce_gfp to blk_kmalloc

Andi Kleen
2008-03-07T09:23:03Z

Only difference in behaviour is that GFP_NOIO is not passed here now,
but I think that is ok in this case because this is not in a write out path.

Cc: jgarzik@pobox.com

Signed-off-by: Andi Kleen <ak@suse.de>

---
drivers/ata/libata-scsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/drivers/ata/libata-scsi.c
===================================================================
--- linux.orig/drivers/ata/libata-scsi.c
+++ linux/drivers/ata/libata-scsi.c
@@ -868,7 +868,7 @@ static int ata_scsi_dev_config(struct sc
blk_queue_dma_pad(sdev->request_queue, ATA_DMA_PAD_SZ - 1);

/* configure draining */
- buf = kmalloc(ATAPI_MAX_DRAIN, q->bounce_gfp | GFP_KERNEL);
+ buf = blk_kmalloc(q, ATAPI_MAX_DRAIN, GFP_KERNEL);
if (!buf) {
ata_dev_printk(dev, KERN_ERR,
"drain buffer allocation failed\n");