aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/mmap.c')
-rw-r--r--mm/mmap.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index c43b28457007..d931d7e49ac9 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1508,11 +1508,15 @@ static int acct_stack_growth(struct vm_area_struct * vma, unsigned long size, un
1508 return 0; 1508 return 0;
1509} 1509}
1510 1510
1511#ifdef CONFIG_STACK_GROWSUP 1511#if defined(CONFIG_STACK_GROWSUP) || defined(CONFIG_IA64)
1512/* 1512/*
1513 * vma is the first one with address > vma->vm_end. Have to extend vma. 1513 * PA-RISC uses this for its stack; IA64 for its Register Backing Store.
1514 * vma is the last one with address > vma->vm_end. Have to extend vma.
1514 */ 1515 */
1515int expand_stack(struct vm_area_struct * vma, unsigned long address) 1516#ifdef CONFIG_STACK_GROWSUP
1517static inline
1518#endif
1519int expand_upwards(struct vm_area_struct *vma, unsigned long address)
1516{ 1520{
1517 int error; 1521 int error;
1518 1522
@@ -1550,6 +1554,13 @@ int expand_stack(struct vm_area_struct * vma, unsigned long address)
1550 anon_vma_unlock(vma); 1554 anon_vma_unlock(vma);
1551 return error; 1555 return error;
1552} 1556}
1557#endif /* CONFIG_STACK_GROWSUP || CONFIG_IA64 */
1558
1559#ifdef CONFIG_STACK_GROWSUP
1560int expand_stack(struct vm_area_struct *vma, unsigned long address)
1561{
1562 return expand_upwards(vma, address);
1563}
1553 1564
1554struct vm_area_struct * 1565struct vm_area_struct *
1555find_extend_vma(struct mm_struct *mm, unsigned long addr) 1566find_extend_vma(struct mm_struct *mm, unsigned long addr)