fs: add ksys_p{read,write}64() helpers; remove in-kernel calls to syscalls
Using the ksys_p{read,write}64() wrappers allows us to get rid of in-kernel calls to the sys_pread64() and sys_pwrite64() syscalls. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_p{read,write}64(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Tento commit je obsažen v:
@@ -315,7 +315,7 @@ COMPAT_SYSCALL_DEFINE5(s390_pread64, unsigned int, fd, char __user *, ubuf,
|
||||
{
|
||||
if ((compat_ssize_t) count < 0)
|
||||
return -EINVAL;
|
||||
return sys_pread64(fd, ubuf, count, (unsigned long)high << 32 | low);
|
||||
return ksys_pread64(fd, ubuf, count, (unsigned long)high << 32 | low);
|
||||
}
|
||||
|
||||
COMPAT_SYSCALL_DEFINE5(s390_pwrite64, unsigned int, fd, const char __user *, ubuf,
|
||||
@@ -323,7 +323,7 @@ COMPAT_SYSCALL_DEFINE5(s390_pwrite64, unsigned int, fd, const char __user *, ubu
|
||||
{
|
||||
if ((compat_ssize_t) count < 0)
|
||||
return -EINVAL;
|
||||
return sys_pwrite64(fd, ubuf, count, (unsigned long)high << 32 | low);
|
||||
return ksys_pwrite64(fd, ubuf, count, (unsigned long)high << 32 | low);
|
||||
}
|
||||
|
||||
COMPAT_SYSCALL_DEFINE4(s390_readahead, int, fd, u32, high, u32, low, s32, count)
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele