aboutsummaryrefslogtreecommitdiffstats
path: root/mm/madvise.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/madvise.c')
-rw-r--r--mm/madvise.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mm/madvise.c b/mm/madvise.c
index 319528b8db74..ecde40a401c1 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -71,6 +71,11 @@ static long madvise_behavior(struct vm_area_struct * vma,
71 if (error) 71 if (error)
72 goto out; 72 goto out;
73 break; 73 break;
74 case MADV_HUGEPAGE:
75 error = hugepage_madvise(&new_flags);
76 if (error)
77 goto out;
78 break;
74 } 79 }
75 80
76 if (new_flags == vma->vm_flags) { 81 if (new_flags == vma->vm_flags) {
@@ -283,6 +288,9 @@ madvise_behavior_valid(int behavior)
283 case MADV_MERGEABLE: 288 case MADV_MERGEABLE:
284 case MADV_UNMERGEABLE: 289 case MADV_UNMERGEABLE:
285#endif 290#endif
291#ifdef CONFIG_TRANSPARENT_HUGEPAGE
292 case MADV_HUGEPAGE:
293#endif
286 return 1; 294 return 1;
287 295
288 default: 296 default: