mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: David Rientjes <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Andi Kleen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
f0be3d32b0
commit
846a16bf0f
5 changed files with 16 additions and 16 deletions
|
|
@ -1810,7 +1810,7 @@ int split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
|
|||
new->vm_pgoff += ((addr - vma->vm_start) >> PAGE_SHIFT);
|
||||
}
|
||||
|
||||
pol = mpol_copy(vma_policy(vma));
|
||||
pol = mpol_dup(vma_policy(vma));
|
||||
if (IS_ERR(pol)) {
|
||||
kmem_cache_free(vm_area_cachep, new);
|
||||
return PTR_ERR(pol);
|
||||
|
|
@ -2126,7 +2126,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
|
|||
new_vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
|
||||
if (new_vma) {
|
||||
*new_vma = *vma;
|
||||
pol = mpol_copy(vma_policy(vma));
|
||||
pol = mpol_dup(vma_policy(vma));
|
||||
if (IS_ERR(pol)) {
|
||||
kmem_cache_free(vm_area_cachep, new_vma);
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue