diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2012-02-12 22:58:52 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2012-02-13 18:45:42 -0500 |
commit | 4040153087478993cbf0809f444400a3c808074c (patch) | |
tree | 2dc7af85b0cf930f1656553bd38410b8c16601a6 /mm | |
parent | 191c542442fdf53cc3c496c00be13367fd9cd42d (diff) |
security: trim security.h
Trim security.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mmap.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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 | */ | ||
942 | static 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(¤t->mm->mmap_sem). | 952 | * The caller must hold down_write(¤t->mm->mmap_sem). |
940 | */ | 953 | */ |
941 | 954 | ||