VM: add "vm_brk()" helper function

It does the same thing as "do_brk()", except it handles the VM locking
too.

It turns out that all external callers want that anyway, so we can make
do_brk() static to just mm/mmap.c while at it.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Linus Torvalds
2012-04-20 15:35:40 -07:00
parent 3b422e9c2c
commit e4eb1ff61b
6 changed files with 31 additions and 45 deletions

View File

@@ -1744,7 +1744,7 @@ void exit_mmap(struct mm_struct *mm)
kleave("");
}
unsigned long do_brk(unsigned long addr, unsigned long len)
unsigned long vm_brk(unsigned long addr, unsigned long len)
{
return -ENOMEM;
}