arm64: Use the generic compat_sys_sendfile() implementation
authorCatalin Marinas <catalin.marinas@arm.com>
Wed, 3 Oct 2012 10:20:20 +0000 (11:20 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 8 Oct 2012 15:03:42 +0000 (16:03 +0100)
The generic implementation of compat_sys_sendfile() has been introduced
by commit 8f9c0119. This patch removes the arm64 implementation in
favour of the generic one.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/unistd32.h
arch/arm64/kernel/sys_compat.c

index 3ba1f1a906296cf4e355ba73e9464da37b53d69c..ba42d41fc5c2398a97d5a0647067584a987cdc6b 100644 (file)
@@ -752,3 +752,4 @@ __SYSCALL(__NR_syncfs, sys_syncfs)
 #define __ARCH_WANT_SYS_SIGPENDING
 #define __ARCH_WANT_SYS_SIGPROCMASK
 #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
+#define __ARCH_WANT_COMPAT_SYS_SENDFILE
index 967e92fdff014fa57f8cda24417e4d804db6c88b..93f10e27dc796764d50d6c4d18b7310cd36cbeb5 100644 (file)
@@ -84,26 +84,6 @@ asmlinkage int compat_sys_sched_rr_get_interval(compat_pid_t pid,
        return ret;
 }
 
-asmlinkage int compat_sys_sendfile(int out_fd, int in_fd,
-                                  compat_off_t __user *offset, s32 count)
-{
-       mm_segment_t old_fs = get_fs();
-       int ret;
-       off_t of;
-
-       if (offset && get_user(of, offset))
-               return -EFAULT;
-
-       set_fs(KERNEL_DS);
-       ret = sys_sendfile(out_fd, in_fd, offset ? (off_t __user *)&of : NULL,
-                          count);
-       set_fs(old_fs);
-
-       if (offset && put_user(of, offset))
-               return -EFAULT;
-       return ret;
-}
-
 static inline void
 do_compat_cache_op(unsigned long start, unsigned long end, int flags)
 {