aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mmap.c
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.cz>2011-05-24 20:11:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-25 11:39:12 -0400
commitd05f3169c0fbca16132ec7c2be71685c6de638b5 (patch)
tree37d82004869fa4e530617883f12cab7538dbd4a6 /mm/mmap.c
parent248ac0e1943ad1796393d281b096184719eb3f97 (diff)
mm: make expand_downwards() symmetrical with expand_upwards()
Currently we have expand_upwards exported while expand_downwards is accessible only via expand_stack or expand_stack_downwards. check_stack_guard_page is a nice example of the asymmetry. It uses expand_stack for VM_GROWSDOWN while expand_upwards is called for VM_GROWSUP case. Let's clean this up by exporting both functions and make those names consistent. Let's use expand_{upwards,downwards} because expanding doesn't always involve stack manipulation (an example is ia64_do_page_fault which uses expand_upwards for registers backing store expansion). expand_downwards has to be defined for both CONFIG_STACK_GROWS{UP,DOWN} because get_arg_page calls the downwards version in the early process initialization phase for growsup configuration. Signed-off-by: Michal Hocko <mhocko@suse.cz> Acked-by: Hugh Dickins <hughd@google.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: "Luck, Tony" <tony.luck@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/mmap.c')
-rw-r--r--mm/mmap.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index e76f8d752884..adb12527fd0e 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1774,7 +1774,7 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
1774/* 1774/*
1775 * vma is the first one with address < vma->vm_start. Have to extend vma. 1775 * vma is the first one with address < vma->vm_start. Have to extend vma.
1776 */ 1776 */
1777static int expand_downwards(struct vm_area_struct *vma, 1777int expand_downwards(struct vm_area_struct *vma,
1778 unsigned long address) 1778 unsigned long address)
1779{ 1779{
1780 int error; 1780 int error;
@@ -1821,11 +1821,6 @@ static int expand_downwards(struct vm_area_struct *vma,
1821 return error; 1821 return error;
1822} 1822}
1823 1823
1824int expand_stack_downwards(struct vm_area_struct *vma, unsigned long address)
1825{
1826 return expand_downwards(vma, address);
1827}
1828
1829#ifdef CONFIG_STACK_GROWSUP 1824#ifdef CONFIG_STACK_GROWSUP
1830int expand_stack(struct vm_area_struct *vma, unsigned long address) 1825int expand_stack(struct vm_area_struct *vma, unsigned long address)
1831{ 1826{