diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-24 02:17:03 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-03 22:58:46 -0500 |
commit | 19f4fc3aee180000fe45952691bbe69dde1d9e95 (patch) | |
tree | 195578ae347797f6aeb66f237aeea7e0eae9847c /fs/compat.c | |
parent | 7d197ed4a68e76000070979563051e08bf6fc0aa (diff) |
convert sendfile{,64} to COMPAT_SYSCALL_DEFINE
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/compat.c')
-rw-r--r-- | fs/compat.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/fs/compat.c b/fs/compat.c index cc09312f9aed..2ae2a98891cd 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
@@ -1718,25 +1718,3 @@ COMPAT_SYSCALL_DEFINE3(open_by_handle_at, int, mountdirfd, | |||
1718 | return do_handle_open(mountdirfd, handle, flags); | 1718 | return do_handle_open(mountdirfd, handle, flags); |
1719 | } | 1719 | } |
1720 | #endif | 1720 | #endif |
1721 | |||
1722 | #ifdef __ARCH_WANT_COMPAT_SYS_SENDFILE | ||
1723 | asmlinkage long compat_sys_sendfile(int out_fd, int in_fd, | ||
1724 | compat_off_t __user *offset, compat_size_t count) | ||
1725 | { | ||
1726 | loff_t pos; | ||
1727 | off_t off; | ||
1728 | ssize_t ret; | ||
1729 | |||
1730 | if (offset) { | ||
1731 | if (unlikely(get_user(off, offset))) | ||
1732 | return -EFAULT; | ||
1733 | pos = off; | ||
1734 | ret = do_sendfile(out_fd, in_fd, &pos, count, MAX_NON_LFS); | ||
1735 | if (unlikely(put_user(pos, offset))) | ||
1736 | return -EFAULT; | ||
1737 | return ret; | ||
1738 | } | ||
1739 | |||
1740 | return do_sendfile(out_fd, in_fd, NULL, count, 0); | ||
1741 | } | ||
1742 | #endif /* __ARCH_WANT_COMPAT_SYS_SENDFILE */ | ||