Skip to contentSkip to conversation

percpu: change a method freeing a chunk for consistency.

PATCH Applied Joonsoo Kim 2 participants 2 messages Oct 29, 2012

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

PATCH 1/1 percpu: change a method freeing a chunk for consistency.

commit 099a19d9('allow limited allocation before slab is online') changes a method allocating a chunk from kzalloc to pcpu_mem_alloc.
But, it missed changing matched free operation.
It may not be a problem for now, but fix it for consistency.

Cc Christoph Lameter <[email protected]>
mm/percpu.c +1 -1
index ddc5efb..ec25896 100644
@@ -631,7 +631,7 @@ static void pcpu_free_chunk(struct pcpu_chunk *chunk)
 	if (!chunk)
 		return;
 	pcpu_mem_free(chunk->map, chunk->map_alloc * sizeof(chunk->map[0]));
-	kfree(chunk);
+	pcpu_mem_free(chunk, pcpu_chunk_struct_size);
 }
 
 /*
Signature · 7 lines
1.7.9.5

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
maintainer Applied
#1 lore raw
Quoted 7 lines · Joonsoo Kim

commit 099a19d9('allow limited allocation before slab is online') changes a method allocating a chunk from kzalloc to pcpu_mem_alloc.
But, it missed changing matched free operation.
It may not be a problem for now, but fix it for consistency.

Cc Christoph Lameter <[email protected]>

Applied to percpu/for-3.8 w/ commit message updated.

Thanks.

Signature · 7 lines
tejun

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>