Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332378
b: refs/heads/master
c: 8e72033
h: refs/heads/master
v: v3
  • Loading branch information
Gerald Schaefer authored and Linus Torvalds committed Oct 9, 2012
1 parent 017d6a0 commit 95b9a5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 46dcde735c9d8953bbd8d105ca6779e5b5300c28
refs/heads/master: 8e72033f2a489b6c98c4e3c7cc281b1afd6cb85c
4 changes: 4 additions & 0 deletions trunk/mm/huge_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -1450,13 +1450,17 @@ int split_huge_page(struct page *page)
int hugepage_madvise(struct vm_area_struct *vma,
unsigned long *vm_flags, int advice)
{
struct mm_struct *mm = vma->vm_mm;

switch (advice) {
case MADV_HUGEPAGE:
/*
* Be somewhat over-protective like KSM for now!
*/
if (*vm_flags & (VM_HUGEPAGE | VM_NO_THP))
return -EINVAL;
if (mm->def_flags & VM_NOHUGEPAGE)
return -EINVAL;
*vm_flags &= ~VM_NOHUGEPAGE;
*vm_flags |= VM_HUGEPAGE;
/*
Expand Down

0 comments on commit 95b9a5e

Please sign in to comment.