Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308838
b: refs/heads/master
c: 0ce72d4
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed May 29, 2012
1 parent ac26583 commit 12b3dfe
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4a5b18cc1971046d9ca3a29fdcafbe5648629585
refs/heads/master: 0ce72d4f7333248efbef1f3309770c7edb1b2625
9 changes: 4 additions & 5 deletions trunk/include/linux/mempolicy.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ static inline void check_highest_zone(enum zone_type k)
policy_zone = k;
}

int do_migrate_pages(struct mm_struct *mm,
const nodemask_t *from_nodes, const nodemask_t *to_nodes, int flags);
int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from,
const nodemask_t *to, int flags);


#ifdef CONFIG_TMPFS
Expand Down Expand Up @@ -354,9 +354,8 @@ static inline bool mempolicy_nodemask_intersects(struct task_struct *tsk,
return false;
}

static inline int do_migrate_pages(struct mm_struct *mm,
const nodemask_t *from_nodes,
const nodemask_t *to_nodes, int flags)
static inline int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from,
const nodemask_t *to, int flags)
{
return 0;
}
Expand Down
18 changes: 9 additions & 9 deletions trunk/mm/mempolicy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
int do_migrate_pages(struct mm_struct *mm,
const nodemask_t *from_nodes, const nodemask_t *to_nodes, int flags)
int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from,
const nodemask_t *to, int flags)
{
int busy = 0;
int err;
Expand All @@ -963,7 +963,7 @@ int do_migrate_pages(struct mm_struct *mm,

down_read(&mm->mmap_sem);

err = migrate_vmas(mm, from_nodes, to_nodes, flags);
err = migrate_vmas(mm, from, to, flags);
if (err)
goto out;

Expand Down Expand Up @@ -998,7 +998,7 @@ int do_migrate_pages(struct mm_struct *mm,
* moved to an empty node, then there is nothing left worth migrating.
*/

tmp = *from_nodes;
tmp = *from;
while (!nodes_empty(tmp)) {
int s,d;
int source = -1;
Expand All @@ -1021,11 +1021,11 @@ int do_migrate_pages(struct mm_struct *mm,
* [0-7] - > [3,4,5] moves only 0,1,2,6,7.
*/

if ((nodes_weight(*from_nodes) != nodes_weight(*to_nodes)) &&
(node_isset(s, *to_nodes)))
if ((nodes_weight(*from) != nodes_weight(*to)) &&
(node_isset(s, *to)))
continue;

d = node_remap(s, *from_nodes, *to_nodes);
d = node_remap(s, *from, *to);
if (s == d)
continue;

Expand Down Expand Up @@ -1085,8 +1085,8 @@ static void migrate_page_add(struct page *page, struct list_head *pagelist,
{
}

int do_migrate_pages(struct mm_struct *mm,
const nodemask_t *from_nodes, const nodemask_t *to_nodes, int flags)
int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from,
const nodemask_t *to, int flags)
{
return -ENOSYS;
}
Expand Down

0 comments on commit 12b3dfe

Please sign in to comment.