Skip to contentSkip to conversation

From last __GFP_ZERO changes

PATCH Marco Cipullo 3 participants 3 messages Jan 6, 2005 – Jan 7, 2005 Block layer

lore
Share & tools
lore
#0 lore raw
Quoted 1 line

From last __GFP_ZERO changes:

drivers/block/pktcdvd.c +1 -1
@@ -135,12 +135,10 @@
 		goto no_bio;
 
 	for (i = 0; i < PAGES_PER_PACKET; i++) {
-		pkt->pages[i] = alloc_page(GFP_KERNEL);
+		pkt->pages[i] = alloc_page(GFP_KERNEL|| __GFP_ZERO);
 

Is this OK?

Or should be

for (i = 0; i < PAGES_PER_PACKET; i++) {
- pkt->pages[i] = alloc_page(GFP_KERNEL);
+ pkt->pages[i] = alloc_page(GFP_KERNEL| __GFP_ZERO);

Bye
Marco

#1 lore raw
Quoted 15 lines · Marco Cipullo

From last __GFP_ZERO changes:

drivers/block/pktcdvd.c +1 -1
@@ -135,12 +135,10 @@
 		goto no_bio;
 
 	for (i = 0; i < PAGES_PER_PACKET; i++) {
-		pkt->pages[i] = alloc_page(GFP_KERNEL);
+		pkt->pages[i] = alloc_page(GFP_KERNEL|| __GFP_ZERO);
 

Is this OK?

Or should be

drivers/block/pktcdvd.c

Quoted 3 lines
drivers/block/pktcdvd.c +1 -1
 	for (i = 0; i < PAGES_PER_PACKET; i++) {
-		pkt->pages[i] = alloc_page(GFP_KERNEL);
+		pkt->pages[i] = alloc_page(GFP_KERNEL| __GFP_ZERO);

It definitely should be the latter.

CCing Christoph so he can fix this up.

mh

Signature · 2 lines
Martin Hicks                Wild Open Source Inc.
[email protected]     613-266-2296
#2 lore raw
Quoted 15 lines · Martin Hicks
Quoted 13 lines · Marco Cipullo

From last __GFP_ZERO changes:

drivers/block/pktcdvd.c +1 -1
@@ -135,12 +135,10 @@
 		goto no_bio;
 
 	for (i = 0; i < PAGES_PER_PACKET; i++) {
-		pkt->pages[i] = alloc_page(GFP_KERNEL);
+		pkt->pages[i] = alloc_page(GFP_KERNEL|| __GFP_ZERO);
 

Is this OK?

Quoted 7 lines

drivers/block/pktcdvd.c

Quoted 5 lines

Or should be

drivers/block/pktcdvd.c +1 -1
 	for (i = 0; i < PAGES_PER_PACKET; i++) {
-		pkt->pages[i] = alloc_page(GFP_KERNEL);
+		pkt->pages[i] = alloc_page(GFP_KERNEL| __GFP_ZERO);

It definitely should be the latter.

Correct. Please submit the patch. I see a patch that fixes a pktcdvd.c issue in Andrews tree so it was likely already fixed without me hearing of it.