linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 1/4] mm/vmalloc: don't set area->caller twice
@ 2013-09-25  1:02 Wanpeng Li
  2013-09-25  1:02 ` [PATCH v7 2/4] mm/vmalloc: fix show vmap_area information race with vmap_area tear down Wanpeng Li
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Wanpeng Li @ 2013-09-25  1:02 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Joonsoo Kim, David Rientjes, KOSAKI Motohiro, Zhang Yanfei,
	linux-mm, linux-kernel, Wanpeng Li

Changelog:
 *v1 -> v2: rebase against mmotm tree
 *v6 -> v7: drop "caller" argument of __vmalloc_area_node()

The caller address has already been set in set_vmalloc_vm(), there's no need
to set it again in __vmalloc_area_node.

Reviewed-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
---
 mm/vmalloc.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 1074543..f75c2aa 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1546,7 +1546,7 @@ static void *__vmalloc_node(unsigned long size, unsigned long align,
 			    gfp_t gfp_mask, pgprot_t prot,
 			    int node, const void *caller);
 static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
-				 pgprot_t prot, int node, const void *caller)
+				 pgprot_t prot, int node)
 {
 	const int order = 0;
 	struct page **pages;
@@ -1560,13 +1560,12 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
 	/* Please note that the recursion is strictly bounded. */
 	if (array_size > PAGE_SIZE) {
 		pages = __vmalloc_node(array_size, 1, nested_gfp|__GFP_HIGHMEM,
-				PAGE_KERNEL, node, caller);
+				PAGE_KERNEL, node, area->caller);
 		area->flags |= VM_VPAGES;
 	} else {
 		pages = kmalloc_node(array_size, nested_gfp, node);
 	}
 	area->pages = pages;
-	area->caller = caller;
 	if (!area->pages) {
 		remove_vm_area(area->addr);
 		kfree(area);
@@ -1634,7 +1633,7 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align,
 	if (!area)
 		goto fail;
 
-	addr = __vmalloc_area_node(area, gfp_mask, prot, node, caller);
+	addr = __vmalloc_area_node(area, gfp_mask, prot, node);
 	if (!addr)
 		goto fail;
 
-- 
1.7.5.4

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

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

end of thread, other threads:[~2013-09-25  1:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-25  1:02 [PATCH v7 1/4] mm/vmalloc: don't set area->caller twice Wanpeng Li
2013-09-25  1:02 ` [PATCH v7 2/4] mm/vmalloc: fix show vmap_area information race with vmap_area tear down Wanpeng Li
2013-09-25  1:02 ` [PATCH v7 3/4] mm/vmalloc: revert "mm/vmalloc.c: check VM_UNINITIALIZED flag in s_show instead of show_numa_info" Wanpeng Li
2013-09-25  1:02 ` [PATCH v7 4/4] revert mm/vmalloc.c: emit the failure message before return Wanpeng Li

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).