Skip to contentSkip to conversation

Remove naked GFP_DMA from drivers/scsi/sd.c

PATCH New Matthew Wilcox 1 participant 1 message Feb 28, 2003 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove naked GFP_DMA from drivers/scsi/sd.c

This GFP_DMA can be GFP_KERNEL because sd_init_onedisk calls sd_spinup_disk calls scsi_wait_req which can sleep.

drivers/scsi/sd.c +1 -1
diff -urpNX dontdiff linux-2.5.63/drivers/scsi/sd.c linux-2.5.63-gfpdma/drivers/scsi/sd.c
@@ -1197,7 +1197,7 @@ sd_init_onedisk(struct scsi_disk * sdkp,
 		return;
 	}
 
-	buffer = kmalloc(512, GFP_DMA);
+	buffer = kmalloc(512, GFP_KERNEL | GFP_DMA);
 	if (!buffer) {
 		printk(KERN_WARNING "(sd_init_onedisk:) Memory allocation "
 		       "failure.\n");
Signature · 3 lines
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk