diff options
Diffstat (limited to 'mm/mmap.c')
-rw-r--r-- | mm/mmap.c | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -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 | */ |
1515 | int expand_stack(struct vm_area_struct * vma, unsigned long address) | 1516 | #ifdef CONFIG_STACK_GROWSUP |
1517 | static inline | ||
1518 | #endif | ||
1519 | int 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 | ||
1560 | int expand_stack(struct vm_area_struct *vma, unsigned long address) | ||
1561 | { | ||
1562 | return expand_upwards(vma, address); | ||
1563 | } | ||
1553 | 1564 | ||
1554 | struct vm_area_struct * | 1565 | struct vm_area_struct * |
1555 | find_extend_vma(struct mm_struct *mm, unsigned long addr) | 1566 | find_extend_vma(struct mm_struct *mm, unsigned long addr) |