Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21079
b: refs/heads/master
c: 90036ee
h: refs/heads/master
i:
  21077: 88568d8
  21075: 7eea5e2
  21071: 3b88f36
v: v3
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Mar 17, 2006
1 parent a901fdd commit 995b3fb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 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: e0e8eb54d8ae0c4cfd1d297f6351b08a7f635c5f
refs/heads/master: 90036ee5938d89638e80f4d0d0700d0f2dbd4a6a
14 changes: 12 additions & 2 deletions trunk/mm/mempolicy.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,19 @@ check_range(struct mm_struct *mm, unsigned long start, unsigned long end,
int err;
struct vm_area_struct *first, *vma, *prev;

/* Clear the LRU lists so pages can be isolated */
if (flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL))
if (flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL)) {
/* Must have swap device for migration */
if (nr_swap_pages <= 0)
return ERR_PTR(-ENODEV);

/*
* Clear the LRU lists so pages can be isolated.
* Note that pages may be moved off the LRU after we have
* drained them. Those pages will fail to migrate like other
* pages that may be busy.
*/
lru_add_drain_all();
}

first = find_vma(mm, start);
if (!first)
Expand Down

0 comments on commit 995b3fb

Please sign in to comment.