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>
This commit is contained in:
@@ -965,6 +965,10 @@ int ksys_unshare(unsigned long unshare_flags);
|
||||
int ksys_setsid(void);
|
||||
int ksys_sync_file_range(int fd, loff_t offset, loff_t nbytes,
|
||||
unsigned int flags);
|
||||
ssize_t ksys_pread64(unsigned int fd, char __user *buf, size_t count,
|
||||
loff_t pos);
|
||||
ssize_t ksys_pwrite64(unsigned int fd, const char __user *buf,
|
||||
size_t count, loff_t pos);
|
||||
|
||||
/*
|
||||
* The following kernel syscall equivalents are just wrappers to fs-internal
|
||||
|
Reference in New Issue
Block a user