aboutsummaryrefslogtreecommitdiff
path: root/mm/huge_memory.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-05-24 12:17:43 +0800
committerAlex Shi <alex.shi@linaro.org>2016-05-24 12:17:43 +0800
commit6c1be3bf831c5b1f2ba51425315287df2c350633 (patch)
treefd07371829b4b5ea7db114502ac12fd989aa4e2a /mm/huge_memory.c
parentada3625ee9203002b2cac60be802dae952ae3e22 (diff)
parent3b6aa07b936b09d38c1bfcee1e06845b968df475 (diff)
Merge tag 'v3.18.34' into linux-linaro-lsk-v3.18lsk-v3.18-16.05
This is the 3.18.34 stable release
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r--mm/huge_memory.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index de984159cf0b..2e39d4e0ff09 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -2081,10 +2081,9 @@ int khugepaged_enter_vma_merge(struct vm_area_struct *vma,
* page fault if needed.
*/
return 0;
- if (vma->vm_ops)
+ if (vma->vm_ops || (vm_flags & VM_NO_THP))
/* khugepaged not yet working on file or special mappings */
return 0;
- VM_BUG_ON_VMA(vm_flags & VM_NO_THP, vma);
hstart = (vma->vm_start + ~HPAGE_PMD_MASK) & HPAGE_PMD_MASK;
hend = vma->vm_end & HPAGE_PMD_MASK;
if (hstart < hend)
@@ -2407,8 +2406,7 @@ static bool hugepage_vma_check(struct vm_area_struct *vma)
return false;
if (is_vma_temporary_stack(vma))
return false;
- VM_BUG_ON_VMA(vma->vm_flags & VM_NO_THP, vma);
- return true;
+ return !(vma->vm_flags & VM_NO_THP);
}
static void collapse_huge_page(struct mm_struct *mm,