aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/mmap.c')
-rw-r--r--mm/mmap.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index db05495d6d0a..694a8625ab0d 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -936,6 +936,19 @@ void vm_stat_account(struct mm_struct *mm, unsigned long flags,
936#endif /* CONFIG_PROC_FS */ 936#endif /* CONFIG_PROC_FS */
937 937
938/* 938/*
939 * If a hint addr is less than mmap_min_addr change hint to be as
940 * low as possible but still greater than mmap_min_addr
941 */
942static inline unsigned long round_hint_to_min(unsigned long hint)
943{
944 hint &= PAGE_MASK;
945 if (((void *)hint != NULL) &&
946 (hint < mmap_min_addr))
947 return PAGE_ALIGN(mmap_min_addr);
948 return hint;
949}
950
951/*
939 * The caller must hold down_write(&current->mm->mmap_sem). 952 * The caller must hold down_write(&current->mm->mmap_sem).
940 */ 953 */
941 954