summaryrefslogtreecommitdiff
path: root/include/linux/syscalls.h
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2018-03-11 11:34:40 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2018-04-02 20:15:49 +0200
commitc7248321a3d42ffba78db0dde88d1c49ca1c045f (patch)
treeecd2b86a077f764e200b3c214cd1f851d4e3c6e0 /include/linux/syscalls.h
parent3a18ef5c1b3935cb05888fc37964321f7bd6231d (diff)
fs: add ksys_dup{,3}() helper; remove in-kernel calls to sys_dup{,3}()
Using ksys_dup() and ksys_dup3() as helper functions allows us to avoid the in-kernel calls to the sys_dup() and sys_dup3() syscalls. The ksys_ prefix denotes that these functions are meant as a drop-in replacement for the syscalls. In particular, they use the same calling convention as sys_dup{,3}(). In the near future, the fs-external callers of ksys_dup{,3}() should be converted to call do_dup2() directly. Then, ksys_dup{,3}() can be moved within sys_dup{,3}() again. 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: Alexander Viro <viro@zeniv.linux.org.uk> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'include/linux/syscalls.h')
-rw-r--r--include/linux/syscalls.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 48964c408c7b..50876ae1d17b 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -949,5 +949,6 @@ asmlinkage long sys_statx(int dfd, const char __user *path, unsigned flags,
int ksys_mount(char __user *dev_name, char __user *dir_name, char __user *type,
unsigned long flags, void __user *data);
int ksys_umount(char __user *name, int flags);
+int ksys_dup(unsigned int fildes);
#endif