mmap: EINVAL not ENOMEM when rejecting VM_GROWS
authorHugh Dickins <hughd@google.com>
Tue, 6 Mar 2012 20:28:52 +0000 (12:28 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 6 Mar 2012 21:49:08 +0000 (13:49 -0800)
commitce8fea7aa4ad9e3b40999a08622ef27c77159659
tree7d8696e506db022aa03f5927c9593db4df1ac2b8
parent917ec63b61720b177271450399bca2f8c5168c0d
mmap: EINVAL not ENOMEM when rejecting VM_GROWS

Currently error is -ENOMEM when rejecting VM_GROWSDOWN|VM_GROWSUP
from shared anonymous: hoist the file case's -EINVAL up for both.

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/mmap.c