summaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorLinus Torvalds2016-05-28 00:57:31 +0200
committerLinus Torvalds2016-05-28 00:57:31 +0200
commit5d22fc25d4fc8096d2d7df27ea1893d4e055e764 (patch)
tree464a86dc3d004dd334e37a8fe7e7b42f8511581e /include/linux/mm.h
parentremove lots of IS_ERR_VALUE abuses (diff)
downloadkernel-qcow2-linux-5d22fc25d4fc8096d2d7df27ea1893d4e055e764.tar.gz
kernel-qcow2-linux-5d22fc25d4fc8096d2d7df27ea1893d4e055e764.tar.xz
kernel-qcow2-linux-5d22fc25d4fc8096d2d7df27ea1893d4e055e764.zip
mm: remove more IS_ERR_VALUE abuses
The do_brk() and vm_brk() return value was "unsigned long" and returned the starting address on success, and an error value on failure. The reasons are entirely historical, and go back to it basically behaving like the mmap() interface does. However, nobody actually wanted that interface, and it causes totally pointless IS_ERR_VALUE() confusion. What every single caller actually wants is just the simpler integer return of zero for success and negative error number on failure. So just convert to that much clearer and more common calling convention, and get rid of all the IS_ERR_VALUE() uses wrt vm_brk(). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index a00ec816233a..5df5feb49575 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -2018,7 +2018,7 @@ static inline void mm_populate(unsigned long addr, unsigned long len) {}
#endif
/* These take the mm semaphore themselves */
-extern unsigned long __must_check vm_brk(unsigned long, unsigned long);
+extern int __must_check vm_brk(unsigned long, unsigned long);
extern int vm_munmap(unsigned long, size_t);
extern unsigned long __must_check vm_mmap(struct file *, unsigned long,
unsigned long, unsigned long,