linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] percpu: change a method freeing a chunk for consistency.
@ 2012-10-29 13:59 Joonsoo Kim
  2012-10-29 15:51 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Joonsoo Kim @ 2012-10-29 13:59 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-kernel, linux-mm, Joonsoo Kim, Christoph Lameter

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.

Signed-off-by: Joonsoo Kim <js1304@gmail.com>
Cc: Christoph Lameter <cl@linux.com>

diff --git a/mm/percpu.c b/mm/percpu.c
index ddc5efb..ec25896 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -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);
 }
 
 /*
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] percpu: change a method freeing a chunk for consistency.
  2012-10-29 13:59 [PATCH] percpu: change a method freeing a chunk for consistency Joonsoo Kim
@ 2012-10-29 15:51 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2012-10-29 15:51 UTC (permalink / raw)
  To: Joonsoo Kim; +Cc: linux-kernel, linux-mm, Christoph Lameter

On Mon, Oct 29, 2012 at 10:59:58PM +0900, Joonsoo Kim wrote:
> 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.
> 
> Signed-off-by: Joonsoo Kim <js1304@gmail.com>
> Cc: Christoph Lameter <cl@linux.com>

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

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-29 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-29 13:59 [PATCH] percpu: change a method freeing a chunk for consistency Joonsoo Kim
2012-10-29 15:51 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).