提交 96da3a62 编写于 作者: K Kirill A. Shutemov 提交者: Linus Torvalds

score: handle pgtable_page_ctor() fail

Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Acked-by: NLennox Wu <lennox.wu@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 e89cfa58
...@@ -54,9 +54,12 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm, ...@@ -54,9 +54,12 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm,
struct page *pte; struct page *pte;
pte = alloc_pages(GFP_KERNEL | __GFP_REPEAT, PTE_ORDER); pte = alloc_pages(GFP_KERNEL | __GFP_REPEAT, PTE_ORDER);
if (pte) { if (!pte)
clear_highpage(pte); return NULL;
pgtable_page_ctor(pte); clear_highpage(pte);
if (!pgtable_page_ctor(pte)) {
__free_page(pte);
return NULL;
} }
return pte; return pte;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册