summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/sys_sparc32.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2018-03-20 15:34:57 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2018-03-20 17:05:17 +0100
commit3d0e354e4e51f40a58ae8bff7ded60f0c1f5c618 (patch)
tree0743109297ab83f7072783a5bdf95083b37de6f3 /arch/sparc/kernel/sys_sparc32.c
parentsparc: switch compat pread64 and pwrite64 to COMPAT_SYSCALL_DEFINE (diff)
downloadlinux-3d0e354e4e51f40a58ae8bff7ded60f0c1f5c618.tar.xz
linux-3d0e354e4e51f40a58ae8bff7ded60f0c1f5c618.zip
sparc: switch compat {f,}truncate64() to COMPAT_SYSCALL_DEFINE
... and drop the pointless checks - sys_truncate() itself might've lacked the check when that stuff was first written, but it has already grown one by the time that stuff went into mainline. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/sparc/kernel/sys_sparc32.c')
-rw-r--r--arch/sparc/kernel/sys_sparc32.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/sparc/kernel/sys_sparc32.c b/arch/sparc/kernel/sys_sparc32.c
index 50e9e4fdd8c6..c27e7e9e641b 100644
--- a/arch/sparc/kernel/sys_sparc32.c
+++ b/arch/sparc/kernel/sys_sparc32.c
@@ -52,20 +52,14 @@
#include "systbls.h"
-asmlinkage long sys32_truncate64(const char __user * path, unsigned long high, unsigned long low)
+COMPAT_SYSCALL_DEFINE3(truncate64, const char __user *, path, u32, high, u32, low)
{
- if ((int)high < 0)
- return -EINVAL;
- else
- return sys_truncate(path, (high << 32) | low);
+ return sys_truncate(path, ((u64)high << 32) | low);
}
-asmlinkage long sys32_ftruncate64(unsigned int fd, unsigned long high, unsigned long low)
+COMPAT_SYSCALL_DEFINE3(ftruncate64, unsigned int, fd, u32, high, u32, low)
{
- if ((int)high < 0)
- return -EINVAL;
- else
- return sys_ftruncate(fd, (high << 32) | low);
+ return sys_ftruncate(fd, ((u64)high << 32) | low);
}
static int cp_compat_stat64(struct kstat *stat,