aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mempolicy.h
diff options
context:
space:
mode:
authorLee Schermerhorn <lee.schermerhorn@hp.com>2008-04-28 05:13:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 11:58:23 -0400
commit846a16bf0fc80dc95a414ffce465e3cbf9680247 (patch)
tree45e03061c5e3d8242bf470509771926f37177415 /include/linux/mempolicy.h
parentf0be3d32b05d3fea2fcdbbb81a39dac2a7163169 (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 'include/linux/mempolicy.h')
-rw-r--r--include/linux/mempolicy.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
index 507bf5e29f24..5e19c2275a6f 100644
--- a/include/linux/mempolicy.h
+++ b/include/linux/mempolicy.h
@@ -73,10 +73,10 @@ struct mm_struct;
73 * Mempolicy objects are reference counted. A mempolicy will be freed when 73 * Mempolicy objects are reference counted. A mempolicy will be freed when
74 * mpol_put() decrements the reference count to zero. 74 * mpol_put() decrements the reference count to zero.
75 * 75 *
76 * Copying policy objects: 76 * Duplicating policy objects:
77 * mpol_copy() allocates a new mempolicy and copies the specified mempolicy 77 * mpol_dup() allocates a new mempolicy and copies the specified mempolicy
78 * to the new storage. The reference count of the new object is initialized 78 * to the new storage. The reference count of the new object is initialized
79 * to 1, representing the caller of mpol_copy(). 79 * to 1, representing the caller of mpol_dup().
80 */ 80 */
81struct mempolicy { 81struct mempolicy {
82 atomic_t refcnt; 82 atomic_t refcnt;
@@ -105,11 +105,11 @@ static inline void mpol_put(struct mempolicy *pol)
105 __mpol_put(pol); 105 __mpol_put(pol);
106} 106}
107 107
108extern struct mempolicy *__mpol_copy(struct mempolicy *pol); 108extern struct mempolicy *__mpol_dup(struct mempolicy *pol);
109static inline struct mempolicy *mpol_copy(struct mempolicy *pol) 109static inline struct mempolicy *mpol_dup(struct mempolicy *pol)
110{ 110{
111 if (pol) 111 if (pol)
112 pol = __mpol_copy(pol); 112 pol = __mpol_dup(pol);
113 return pol; 113 return pol;
114} 114}
115 115
@@ -198,7 +198,7 @@ static inline void mpol_get(struct mempolicy *pol)
198{ 198{
199} 199}
200 200
201static inline struct mempolicy *mpol_copy(struct mempolicy *old) 201static inline struct mempolicy *mpol_dup(struct mempolicy *old)
202{ 202{
203 return NULL; 203 return NULL;
204} 204}