Skip to contentSkip to conversation

block: use caller's GFP flags instead of GFP_KERNEL

PATCH In review Dan Carpenter 2 participants 2 messages Mar 23, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: use caller's GFP flags instead of GFP_KERNEL

We should use the GFP flags that the caller specified instead of picking our own. All the callers specify GFP_KERNEL so this doesn't make a difference to how the kernel runs, it's just a cleanup.

block/blk-core.c +1 -1
index 3a78b00..414e822 100644
@@ -483,7 +483,7 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)
 	if (!q)
 		return NULL;
 
-	q->id = ida_simple_get(&blk_queue_ida, 0, 0, GFP_KERNEL);
+	q->id = ida_simple_get(&blk_queue_ida, 0, 0, gfp_mask);
 	if (q->id < 0)
 		goto fail_q;
 
maintainer
#1 lore raw
Quoted 3 lines · Dan Carpenter

We should use the GFP flags that the caller specified instead of picking our own. All the callers specify GFP_KERNEL so this doesn't make a difference to how the kernel runs, it's just a cleanup.

Thanks Dan, applied to for-3.4/core

Signature · 1 line
Jens Axboe