aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
authorLee Schermerhorn <lee.schermerhorn@hp.com>2008-10-18 23:26:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-20 11:52:31 -0400
commit9978ad583e100945b74e4f33e73317983ea32df9 (patch)
tree132d3a06664e04cac4635ddba55a0ec36ff2a001 /mm/memory.c
parentc11d69d8c830e09a0e7b3935c952afb26c48bba8 (diff)
mlock: make mlock error return Posixly Correct
Rework Posix error return for mlock(). Posix requires error code for mlock*() system calls for some conditions that differ from what kernel low level functions, such as get_user_pages(), return for those conditions. For more info, see: http://marc.info/?l=linux-kernel&m=121750892930775&w=2 This patch provides the same translation of get_user_pages() error codes to posix specified error codes in the context of the mlock rework for unevictable lru. [akpm@linux-foundation.org: fix build] Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c
index b8487f8cd82e..ba86b436b85f 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2821,7 +2821,7 @@ int make_pages_present(unsigned long addr, unsigned long end)
2821 len, write, 0, NULL, NULL); 2821 len, write, 0, NULL, NULL);
2822 if (ret < 0) 2822 if (ret < 0)
2823 return ret; 2823 return ret;
2824 return ret == len ? 0 : -1; 2824 return ret == len ? 0 : -EFAULT;
2825} 2825}
2826 2826
2827#if !defined(__HAVE_ARCH_GATE_AREA) 2827#if !defined(__HAVE_ARCH_GATE_AREA)