diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2011-01-12 09:55:26 +0100 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2011-01-12 09:55:25 +0100 |
commit | 1060f62ea47e609b0c1672e8d1ac216e57f11a8e (patch) | |
tree | f50a92a770688b3c0d546543214f509ef37f3da3 /arch/s390 | |
parent | 7e0d48574ec371e26fa31e23d1d314f04e31eb3e (diff) |
[S390] Rearrange mmap.c
Shuffle code around so it looks more like x86 and powerpc.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/mm/mmap.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c index ab7e08a01b6..74d663f367e 100644 --- a/arch/s390/mm/mmap.c +++ b/arch/s390/mm/mmap.c @@ -47,6 +47,15 @@ static unsigned long stack_maxrandom_size(void) #define MIN_GAP (32*1024*1024) #define MAX_GAP (STACK_TOP/6*5) +static inline int mmap_is_legacy(void) +{ + if (current->personality & ADDR_COMPAT_LAYOUT) + return 1; + if (rlimit(RLIMIT_STACK) == RLIM_INFINITY) + return 1; + return sysctl_legacy_va_layout; +} + static inline unsigned long mmap_base(void) { unsigned long gap = rlimit(RLIMIT_STACK); @@ -59,15 +68,6 @@ static inline unsigned long mmap_base(void) return STACK_TOP - stack_maxrandom_size() - (gap & PAGE_MASK); } -static inline int mmap_is_legacy(void) -{ - if (current->personality & ADDR_COMPAT_LAYOUT) - return 1; - if (rlimit(RLIMIT_STACK) == RLIM_INFINITY) - return 1; - return sysctl_legacy_va_layout; -} - #ifndef CONFIG_64BIT /* |