Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118436
b: refs/heads/master
c: 0aedadf
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Nov 6, 2008
1 parent 1820dda commit f1e838e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 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: 17a1217e12d8c8434f8a3deef7bf980c724a6ac7
refs/heads/master: 0aedadf91a70a11c4a3e7c7d99b21e5528af8d5d
18 changes: 11 additions & 7 deletions trunk/mm/mempolicy.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,12 +489,6 @@ check_range(struct mm_struct *mm, unsigned long start, unsigned long end,
int err;
struct vm_area_struct *first, *vma, *prev;

if (flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL)) {

err = migrate_prep();
if (err)
return ERR_PTR(err);
}

first = find_vma(mm, start);
if (!first)
Expand Down Expand Up @@ -809,9 +803,13 @@ int do_migrate_pages(struct mm_struct *mm,
const nodemask_t *from_nodes, const nodemask_t *to_nodes, int flags)
{
int busy = 0;
int err = 0;
int err;
nodemask_t tmp;

err = migrate_prep();
if (err)
return err;

down_read(&mm->mmap_sem);

err = migrate_vmas(mm, from_nodes, to_nodes, flags);
Expand Down Expand Up @@ -974,6 +972,12 @@ static long do_mbind(unsigned long start, unsigned long len,
start, start + len, mode, mode_flags,
nmask ? nodes_addr(*nmask)[0] : -1);

if (flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL)) {

err = migrate_prep();
if (err)
return err;
}
down_write(&mm->mmap_sem);
vma = check_range(mm, start, end, nmask,
flags | MPOL_MF_INVERT, &pagelist);
Expand Down
2 changes: 1 addition & 1 deletion trunk/mm/migrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -841,12 +841,12 @@ static int do_move_page_to_node_array(struct mm_struct *mm,
struct page_to_node *pp;
LIST_HEAD(pagelist);

migrate_prep();
down_read(&mm->mmap_sem);

/*
* Build a list of pages to migrate
*/
migrate_prep();
for (pp = pm; pp->node != MAX_NUMNODES; pp++) {
struct vm_area_struct *vma;
struct page *page;
Expand Down

0 comments on commit f1e838e

Please sign in to comment.