diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-01-12 17:56:29 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-01-12 17:56:29 +0100 |
commit | da4540757d35a98a350d6e8d882a64b2d04f8581 (patch) | |
tree | ad77d8752f5db40497c819f051cbae12effb8163 /mm/mempolicy.c | |
parent | cc131eef1cec905b9bdb0be6d7ab3af86f23de98 (diff) | |
parent | 7e22e91102c6b9df7c4ae2168910e19d2bb14cd6 (diff) |
Merge tag 'v3.13-rc8' into x86/ras, to pick up fixes.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'mm/mempolicy.c')
-rw-r--r-- | mm/mempolicy.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index eca4a3129129..0cd2c4d4e270 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -1197,14 +1197,16 @@ static struct page *new_vma_page(struct page *page, unsigned long private, int * break; vma = vma->vm_next; } + + if (PageHuge(page)) { + if (vma) + return alloc_huge_page_noerr(vma, address, 1); + else + return NULL; + } /* - * queue_pages_range() confirms that @page belongs to some vma, - * so vma shouldn't be NULL. + * if !vma, alloc_page_vma() will use task or system default policy */ - BUG_ON(!vma); - - if (PageHuge(page)) - return alloc_huge_page_noerr(vma, address, 1); return alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, address); } #else @@ -1318,7 +1320,7 @@ static long do_mbind(unsigned long start, unsigned long len, if (nr_failed && (flags & MPOL_MF_STRICT)) err = -EIO; } else - putback_lru_pages(&pagelist); + putback_movable_pages(&pagelist); up_write(&mm->mmap_sem); mpol_out: |