提交 0ce72d4f 编写于 作者: A Andrew Morton 提交者: Linus Torvalds

mm: do_migrate_pages(): rename arguments

s/from_nodes/from and s/to_nodes/to/.  The "_nodes" is redundant - it
duplicates the argument's type.

Done in a fit of irritation over 80-col issues :(

Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <mkosaki@redhat.com>
Cc: Larry Woodman <lwoodman@redhat.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 4a5b18cc
...@@ -225,8 +225,8 @@ static inline void check_highest_zone(enum zone_type k) ...@@ -225,8 +225,8 @@ static inline void check_highest_zone(enum zone_type k)
policy_zone = k; policy_zone = k;
} }
int do_migrate_pages(struct mm_struct *mm, int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from,
const nodemask_t *from_nodes, const nodemask_t *to_nodes, int flags); const nodemask_t *to, int flags);
#ifdef CONFIG_TMPFS #ifdef CONFIG_TMPFS
...@@ -354,9 +354,8 @@ static inline bool mempolicy_nodemask_intersects(struct task_struct *tsk, ...@@ -354,9 +354,8 @@ static inline bool mempolicy_nodemask_intersects(struct task_struct *tsk,
return false; return false;
} }
static inline int do_migrate_pages(struct mm_struct *mm, static inline int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from,
const nodemask_t *from_nodes, const nodemask_t *to, int flags)
const nodemask_t *to_nodes, int flags)
{ {
return 0; return 0;
} }
......
...@@ -950,8 +950,8 @@ static int migrate_to_node(struct mm_struct *mm, int source, int dest, ...@@ -950,8 +950,8 @@ static int migrate_to_node(struct mm_struct *mm, int source, int dest,
* *
* Returns the number of page that could not be moved. * Returns the number of page that could not be moved.
*/ */
int do_migrate_pages(struct mm_struct *mm, int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from,
const nodemask_t *from_nodes, const nodemask_t *to_nodes, int flags) const nodemask_t *to, int flags)
{ {
int busy = 0; int busy = 0;
int err; int err;
...@@ -963,7 +963,7 @@ int do_migrate_pages(struct mm_struct *mm, ...@@ -963,7 +963,7 @@ int do_migrate_pages(struct mm_struct *mm,
down_read(&mm->mmap_sem); down_read(&mm->mmap_sem);
err = migrate_vmas(mm, from_nodes, to_nodes, flags); err = migrate_vmas(mm, from, to, flags);
if (err) if (err)
goto out; goto out;
...@@ -998,7 +998,7 @@ int do_migrate_pages(struct mm_struct *mm, ...@@ -998,7 +998,7 @@ int do_migrate_pages(struct mm_struct *mm,
* moved to an empty node, then there is nothing left worth migrating. * moved to an empty node, then there is nothing left worth migrating.
*/ */
tmp = *from_nodes; tmp = *from;
while (!nodes_empty(tmp)) { while (!nodes_empty(tmp)) {
int s,d; int s,d;
int source = -1; int source = -1;
...@@ -1021,11 +1021,11 @@ int do_migrate_pages(struct mm_struct *mm, ...@@ -1021,11 +1021,11 @@ int do_migrate_pages(struct mm_struct *mm,
* [0-7] - > [3,4,5] moves only 0,1,2,6,7. * [0-7] - > [3,4,5] moves only 0,1,2,6,7.
*/ */
if ((nodes_weight(*from_nodes) != nodes_weight(*to_nodes)) && if ((nodes_weight(*from) != nodes_weight(*to)) &&
(node_isset(s, *to_nodes))) (node_isset(s, *to)))
continue; continue;
d = node_remap(s, *from_nodes, *to_nodes); d = node_remap(s, *from, *to);
if (s == d) if (s == d)
continue; continue;
...@@ -1085,8 +1085,8 @@ static void migrate_page_add(struct page *page, struct list_head *pagelist, ...@@ -1085,8 +1085,8 @@ static void migrate_page_add(struct page *page, struct list_head *pagelist,
{ {
} }
int do_migrate_pages(struct mm_struct *mm, int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from,
const nodemask_t *from_nodes, const nodemask_t *to_nodes, int flags) const nodemask_t *to, int flags)
{ {
return -ENOSYS; return -ENOSYS;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册