aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/mmap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index 50a4aa0255a0..753f44d17047 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -29,6 +29,7 @@
29#include <linux/mmu_notifier.h> 29#include <linux/mmu_notifier.h>
30#include <linux/perf_event.h> 30#include <linux/perf_event.h>
31#include <linux/audit.h> 31#include <linux/audit.h>
32#include <linux/khugepaged.h>
32 33
33#include <asm/uaccess.h> 34#include <asm/uaccess.h>
34#include <asm/cacheflush.h> 35#include <asm/cacheflush.h>
@@ -815,6 +816,7 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
815 end, prev->vm_pgoff, NULL); 816 end, prev->vm_pgoff, NULL);
816 if (err) 817 if (err)
817 return NULL; 818 return NULL;
819 khugepaged_enter_vma_merge(prev);
818 return prev; 820 return prev;
819 } 821 }
820 822
@@ -833,6 +835,7 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
833 next->vm_pgoff - pglen, NULL); 835 next->vm_pgoff - pglen, NULL);
834 if (err) 836 if (err)
835 return NULL; 837 return NULL;
838 khugepaged_enter_vma_merge(area);
836 return area; 839 return area;
837 } 840 }
838 841
@@ -1761,6 +1764,7 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
1761 } 1764 }
1762 } 1765 }
1763 vma_unlock_anon_vma(vma); 1766 vma_unlock_anon_vma(vma);
1767 khugepaged_enter_vma_merge(vma);
1764 return error; 1768 return error;
1765} 1769}
1766#endif /* CONFIG_STACK_GROWSUP || CONFIG_IA64 */ 1770#endif /* CONFIG_STACK_GROWSUP || CONFIG_IA64 */
@@ -1808,6 +1812,7 @@ static int expand_downwards(struct vm_area_struct *vma,
1808 } 1812 }
1809 } 1813 }
1810 vma_unlock_anon_vma(vma); 1814 vma_unlock_anon_vma(vma);
1815 khugepaged_enter_vma_merge(vma);
1811 return error; 1816 return error;
1812} 1817}
1813 1818