Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320778
b: refs/heads/master
c: 79dbb23
h: refs/heads/master
v: v3
  • Loading branch information
Aneesh Kumar K.V authored and Linus Torvalds committed Aug 1, 2012
1 parent baa6c6b commit 82c5dfb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 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: 585e27ea6d2e71d0091443c39a00a35e6a5c5e8f
refs/heads/master: 79dbb2368ae3515fad9c8b7c8f831cd86be59b1d
11 changes: 10 additions & 1 deletion trunk/mm/hugetlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -928,8 +928,14 @@ struct page *alloc_huge_page_node(struct hstate *h, int nid)
page = dequeue_huge_page_node(h, nid);
spin_unlock(&hugetlb_lock);

if (!page)
if (!page) {
page = alloc_buddy_huge_page(h, nid);
if (page) {
spin_lock(&hugetlb_lock);
list_move(&page->lru, &h->hugepage_activelist);
spin_unlock(&hugetlb_lock);
}
}

return page;
}
Expand Down Expand Up @@ -1155,6 +1161,9 @@ static struct page *alloc_huge_page(struct vm_area_struct *vma,
hugepage_subpool_put_pages(spool, chg);
return ERR_PTR(-ENOSPC);
}
spin_lock(&hugetlb_lock);
list_move(&page->lru, &h->hugepage_activelist);
spin_unlock(&hugetlb_lock);
}

set_page_private(page, (unsigned long)spool);
Expand Down

0 comments on commit 82c5dfb

Please sign in to comment.