diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-14 14:14:02 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-18 10:35:34 -0800 |
commit | e320fca50d219097a39ec411a0066a6cdb836f37 (patch) | |
tree | db19848b96fa2017159c9015c8794d369fdcc850 /mm/filemap.c | |
parent | 607370f2946963619ba6211af405a471c33ab54b (diff) |
System call wrapper special cases
commit 6673e0c3fbeaed2cd08e2fd4a4aa97382d6fedb0 upstream.
System calls with an unsigned long long argument can't be converted with
the standard wrappers since that would include a cast to long, which in
turn means that we would lose the upper 32 bit on 32 bit architectures.
Also semctl can't use the standard wrapper since it has a 'union'
parameter.
So we handle them as special case and add some extra wrappers instead.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 6a428b70aad..1cd0b87861b 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1353,7 +1353,7 @@ do_readahead(struct address_space *mapping, struct file *filp, return 0; } -asmlinkage long sys_readahead(int fd, loff_t offset, size_t count) +SYSCALL_DEFINE(readahead)(int fd, loff_t offset, size_t count) { ssize_t ret; struct file *file; @@ -1372,6 +1372,13 @@ asmlinkage long sys_readahead(int fd, loff_t offset, size_t count) } return ret; } +#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS +asmlinkage long SyS_readahead(long fd, loff_t offset, long count) +{ + return SYSC_readahead((int) fd, offset, (size_t) count); +} +SYSCALL_ALIAS(sys_readahead, SyS_readahead); +#endif #ifdef CONFIG_MMU /** |