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 /kernel/fork.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 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 1a5ae2084574..6067e429f281 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -279,7 +279,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm) | |||
279 | if (!tmp) | 279 | if (!tmp) |
280 | goto fail_nomem; | 280 | goto fail_nomem; |
281 | *tmp = *mpnt; | 281 | *tmp = *mpnt; |
282 | pol = mpol_copy(vma_policy(mpnt)); | 282 | pol = mpol_dup(vma_policy(mpnt)); |
283 | retval = PTR_ERR(pol); | 283 | retval = PTR_ERR(pol); |
284 | if (IS_ERR(pol)) | 284 | if (IS_ERR(pol)) |
285 | goto fail_nomem_policy; | 285 | goto fail_nomem_policy; |
@@ -1116,7 +1116,7 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1116 | p->audit_context = NULL; | 1116 | p->audit_context = NULL; |
1117 | cgroup_fork(p); | 1117 | cgroup_fork(p); |
1118 | #ifdef CONFIG_NUMA | 1118 | #ifdef CONFIG_NUMA |
1119 | p->mempolicy = mpol_copy(p->mempolicy); | 1119 | p->mempolicy = mpol_dup(p->mempolicy); |
1120 | if (IS_ERR(p->mempolicy)) { | 1120 | if (IS_ERR(p->mempolicy)) { |
1121 | retval = PTR_ERR(p->mempolicy); | 1121 | retval = PTR_ERR(p->mempolicy); |
1122 | p->mempolicy = NULL; | 1122 | p->mempolicy = NULL; |