diff options
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r-- | mm/huge_memory.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index c29ddebc8705..62fe06bb7d04 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c | |||
@@ -2009,7 +2009,7 @@ int hugepage_madvise(struct vm_area_struct *vma, | |||
2009 | /* | 2009 | /* |
2010 | * Be somewhat over-protective like KSM for now! | 2010 | * Be somewhat over-protective like KSM for now! |
2011 | */ | 2011 | */ |
2012 | if (*vm_flags & (VM_HUGEPAGE | VM_NO_THP)) | 2012 | if (*vm_flags & VM_NO_THP) |
2013 | return -EINVAL; | 2013 | return -EINVAL; |
2014 | *vm_flags &= ~VM_NOHUGEPAGE; | 2014 | *vm_flags &= ~VM_NOHUGEPAGE; |
2015 | *vm_flags |= VM_HUGEPAGE; | 2015 | *vm_flags |= VM_HUGEPAGE; |
@@ -2025,7 +2025,7 @@ int hugepage_madvise(struct vm_area_struct *vma, | |||
2025 | /* | 2025 | /* |
2026 | * Be somewhat over-protective like KSM for now! | 2026 | * Be somewhat over-protective like KSM for now! |
2027 | */ | 2027 | */ |
2028 | if (*vm_flags & (VM_NOHUGEPAGE | VM_NO_THP)) | 2028 | if (*vm_flags & VM_NO_THP) |
2029 | return -EINVAL; | 2029 | return -EINVAL; |
2030 | *vm_flags &= ~VM_HUGEPAGE; | 2030 | *vm_flags &= ~VM_HUGEPAGE; |
2031 | *vm_flags |= VM_NOHUGEPAGE; | 2031 | *vm_flags |= VM_NOHUGEPAGE; |