diff options
author | Lee Schermerhorn <lee.schermerhorn@hp.com> | 2008-04-28 05:13:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:23 -0400 |
commit | 846a16bf0fc80dc95a414ffce465e3cbf9680247 (patch) | |
tree | 45e03061c5e3d8242bf470509771926f37177415 /mm/mmap.c | |
parent | f0be3d32b05d3fea2fcdbbb81a39dac2a7163169 (diff) |
mempolicy: rename mpol_copy to mpol_dup
This patch renames mpol_copy() to mpol_dup() because, well, that's what it
does. Like, e.g., strdup() for strings, mpol_dup() takes a pointer to an
existing mempolicy, allocates a new one and copies the contents.
In a later patch, I want to use the name mpol_copy() to copy the contents from
one mempolicy to another like, e.g., strcpy() does for strings.
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/mmap.c')
-rw-r--r-- | mm/mmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1810,7 +1810,7 @@ int split_vma(struct mm_struct * mm, struct vm_area_struct * vma, | |||
1810 | new->vm_pgoff += ((addr - vma->vm_start) >> PAGE_SHIFT); | 1810 | new->vm_pgoff += ((addr - vma->vm_start) >> PAGE_SHIFT); |
1811 | } | 1811 | } |
1812 | 1812 | ||
1813 | pol = mpol_copy(vma_policy(vma)); | 1813 | pol = mpol_dup(vma_policy(vma)); |
1814 | if (IS_ERR(pol)) { | 1814 | if (IS_ERR(pol)) { |
1815 | kmem_cache_free(vm_area_cachep, new); | 1815 | kmem_cache_free(vm_area_cachep, new); |
1816 | return PTR_ERR(pol); | 1816 | return PTR_ERR(pol); |
@@ -2126,7 +2126,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, | |||
2126 | new_vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); | 2126 | new_vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); |
2127 | if (new_vma) { | 2127 | if (new_vma) { |
2128 | *new_vma = *vma; | 2128 | *new_vma = *vma; |
2129 | pol = mpol_copy(vma_policy(vma)); | 2129 | pol = mpol_dup(vma_policy(vma)); |
2130 | if (IS_ERR(pol)) { | 2130 | if (IS_ERR(pol)) { |
2131 | kmem_cache_free(vm_area_cachep, new_vma); | 2131 | kmem_cache_free(vm_area_cachep, new_vma); |
2132 | return NULL; | 2132 | return NULL; |