aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugh Dickins <hughd@google.com>2013-01-02 05:04:23 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-01-02 12:27:10 -0500
commita7a88b23737095e6c18a20c5d4eef9e25ec5b829 (patch)
treeda6000487d0a1e4694fd760ac55467bce091e854
parentf2a07f40dbc603c15f8b06e6ec7f768af67b424f (diff)
mempolicy: remove arg from mpol_parse_str, mpol_to_str
Remove the unused argument (formerly no_context) from mpol_parse_str() and from mpol_to_str(). Signed-off-by: Hugh Dickins <hughd@google.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--fs/proc/task_mmu.c2
-rw-r--r--include/linux/mempolicy.h11
-rw-r--r--mm/mempolicy.c6
-rw-r--r--mm/shmem.c4
4 files changed, 9 insertions, 14 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 448455b7fd91..ca5ce7f9f800 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -1278,7 +1278,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
1278 walk.mm = mm; 1278 walk.mm = mm;
1279 1279
1280 pol = get_vma_policy(task, vma, vma->vm_start); 1280 pol = get_vma_policy(task, vma, vma->vm_start);
1281 mpol_to_str(buffer, sizeof(buffer), pol, 0); 1281 mpol_to_str(buffer, sizeof(buffer), pol);
1282 mpol_cond_put(pol); 1282 mpol_cond_put(pol);
1283 1283
1284 seq_printf(m, "%08lx %s", vma->vm_start, buffer); 1284 seq_printf(m, "%08lx %s", vma->vm_start, buffer);
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
index 9adc270de7ef..92bc9988a180 100644
--- a/include/linux/mempolicy.h
+++ b/include/linux/mempolicy.h
@@ -165,11 +165,10 @@ int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from,
165 165
166 166
167#ifdef CONFIG_TMPFS 167#ifdef CONFIG_TMPFS
168extern int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context); 168extern int mpol_parse_str(char *str, struct mempolicy **mpol);
169#endif 169#endif
170 170
171extern int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol, 171extern int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol);
172 int no_context);
173 172
174/* Check if a vma is migratable */ 173/* Check if a vma is migratable */
175static inline int vma_migratable(struct vm_area_struct *vma) 174static inline int vma_migratable(struct vm_area_struct *vma)
@@ -296,15 +295,13 @@ static inline void check_highest_zone(int k)
296} 295}
297 296
298#ifdef CONFIG_TMPFS 297#ifdef CONFIG_TMPFS
299static inline int mpol_parse_str(char *str, struct mempolicy **mpol, 298static inline int mpol_parse_str(char *str, struct mempolicy **mpol)
300 int no_context)
301{ 299{
302 return 1; /* error */ 300 return 1; /* error */
303} 301}
304#endif 302#endif
305 303
306static inline int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol, 304static inline int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol)
307 int no_context)
308{ 305{
309 return 0; 306 return 0;
310} 307}
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 02c914cca53d..1cb200af3828 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2612,14 +2612,13 @@ static const char * const policy_modes[] =
2612 * mpol_parse_str - parse string to mempolicy, for tmpfs mpol mount option. 2612 * mpol_parse_str - parse string to mempolicy, for tmpfs mpol mount option.
2613 * @str: string containing mempolicy to parse 2613 * @str: string containing mempolicy to parse
2614 * @mpol: pointer to struct mempolicy pointer, returned on success. 2614 * @mpol: pointer to struct mempolicy pointer, returned on success.
2615 * @unused: redundant argument, to be removed later.
2616 * 2615 *
2617 * Format of input: 2616 * Format of input:
2618 * <mode>[=<flags>][:<nodelist>] 2617 * <mode>[=<flags>][:<nodelist>]
2619 * 2618 *
2620 * On success, returns 0, else 1 2619 * On success, returns 0, else 1
2621 */ 2620 */
2622int mpol_parse_str(char *str, struct mempolicy **mpol, int unused) 2621int mpol_parse_str(char *str, struct mempolicy **mpol)
2623{ 2622{
2624 struct mempolicy *new = NULL; 2623 struct mempolicy *new = NULL;
2625 unsigned short mode; 2624 unsigned short mode;
@@ -2747,13 +2746,12 @@ out:
2747 * @buffer: to contain formatted mempolicy string 2746 * @buffer: to contain formatted mempolicy string
2748 * @maxlen: length of @buffer 2747 * @maxlen: length of @buffer
2749 * @pol: pointer to mempolicy to be formatted 2748 * @pol: pointer to mempolicy to be formatted
2750 * @unused: redundant argument, to be removed later.
2751 * 2749 *
2752 * Convert a mempolicy into a string. 2750 * Convert a mempolicy into a string.
2753 * Returns the number of characters in buffer (if positive) 2751 * Returns the number of characters in buffer (if positive)
2754 * or an error (negative) 2752 * or an error (negative)
2755 */ 2753 */
2756int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol, int unused) 2754int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol)
2757{ 2755{
2758 char *p = buffer; 2756 char *p = buffer;
2759 int l; 2757 int l;
diff --git a/mm/shmem.c b/mm/shmem.c
index 5c90d84c2b02..5dd56f6efdbd 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -889,7 +889,7 @@ static void shmem_show_mpol(struct seq_file *seq, struct mempolicy *mpol)
889 if (!mpol || mpol->mode == MPOL_DEFAULT) 889 if (!mpol || mpol->mode == MPOL_DEFAULT)
890 return; /* show nothing */ 890 return; /* show nothing */
891 891
892 mpol_to_str(buffer, sizeof(buffer), mpol, 1); 892 mpol_to_str(buffer, sizeof(buffer), mpol);
893 893
894 seq_printf(seq, ",mpol=%s", buffer); 894 seq_printf(seq, ",mpol=%s", buffer);
895} 895}
@@ -2463,7 +2463,7 @@ static int shmem_parse_options(char *options, struct shmem_sb_info *sbinfo,
2463 if (!gid_valid(sbinfo->gid)) 2463 if (!gid_valid(sbinfo->gid))
2464 goto bad_val; 2464 goto bad_val;
2465 } else if (!strcmp(this_char,"mpol")) { 2465 } else if (!strcmp(this_char,"mpol")) {
2466 if (mpol_parse_str(value, &sbinfo->mpol, 1)) 2466 if (mpol_parse_str(value, &sbinfo->mpol))
2467 goto bad_val; 2467 goto bad_val;
2468 } else { 2468 } else {
2469 printk(KERN_ERR "tmpfs: Bad mount option %s\n", 2469 printk(KERN_ERR "tmpfs: Bad mount option %s\n",