提交 5b701b84 编写于 作者: K Kirill A. Shutemov 提交者: Linus Torvalds

thp: decrement refcount on huge zero page if it is split

The DAX code neglected to put the refcount on the huge zero page.
Also we must notify on splits.
Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: NMatthew Wilcox <willy@linux.intel.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 84317297
......@@ -2978,7 +2978,9 @@ void __split_huge_page_pmd(struct vm_area_struct *vma, unsigned long address,
if (unlikely(!pmd_trans_huge(*pmd)))
goto unlock;
if (vma_is_dax(vma)) {
pmdp_huge_clear_flush(vma, haddr, pmd);
pmd_t _pmd = pmdp_huge_clear_flush_notify(vma, haddr, pmd);
if (is_huge_zero_pmd(_pmd))
put_huge_zero_page();
} else if (is_huge_zero_pmd(*pmd)) {
__split_huge_zero_page_pmd(vma, haddr, pmd);
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册