public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch] percpu: use the right flag for get_vm_area()
@ 2009-08-13  6:00 Amerigo Wang
  2009-08-14  2:01 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Amerigo Wang @ 2009-08-13  6:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: Tejun Heo, linux-mm, akpm, mingo, Amerigo Wang


get_vm_area() only accepts VM_* flags, not GFP_*.

And according to the doc of get_vm_area(), here should be
VM_ALLOC.

Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>

---
diff --git a/mm/percpu.c b/mm/percpu.c
index b70f2ac..3ef18c7 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -749,7 +749,7 @@ static struct pcpu_chunk *alloc_pcpu_chunk(void)
 	chunk->map[chunk->map_used++] = pcpu_unit_size;
 	chunk->page = chunk->page_ar;
 
-	chunk->vm = get_vm_area(pcpu_chunk_size, GFP_KERNEL);
+	chunk->vm = get_vm_area(pcpu_chunk_size, VM_ALLOC);
 	if (!chunk->vm) {
 		free_pcpu_chunk(chunk);
 		return NULL;

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

* Re: [Patch] percpu: use the right flag for get_vm_area()
  2009-08-13  6:00 [Patch] percpu: use the right flag for get_vm_area() Amerigo Wang
@ 2009-08-14  2:01 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2009-08-14  2:01 UTC (permalink / raw)
  To: Amerigo Wang; +Cc: linux-kernel, linux-mm, akpm, mingo

Amerigo Wang wrote:
> get_vm_area() only accepts VM_* flags, not GFP_*.
> 
> And according to the doc of get_vm_area(), here should be
> VM_ALLOC.
> 
> Signed-off-by: WANG Cong <amwang@redhat.com>
> Cc: Tejun Heo <tj@kernel.org>
> Cc: Ingo Molnar <mingo@elte.hu>

Ah... indeed.

Acked-by: Tejun Heo <tj@kernel.org>

Will forward to Linus with other two patches today.

Thanks.

-- 
tejun

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

end of thread, other threads:[~2009-08-14  2:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-13  6:00 [Patch] percpu: use the right flag for get_vm_area() Amerigo Wang
2009-08-14  2:01 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox