diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2018-03-11 11:34:28 +0100 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2018-04-02 20:15:35 +0200 |
commit | 0a216dd1cfe8a4966767e7e8c0bb90c3db163def (patch) | |
tree | c9af5d0a0c0adbc4b58bd971d2279d036b67fb6c /fs/pipe.c | |
parent | 2dae0248061e6a8a2cccfb2ad01a76f674e40d72 (diff) | |
download | op-kernel-dev-0a216dd1cfe8a4966767e7e8c0bb90c3db163def.zip op-kernel-dev-0a216dd1cfe8a4966767e7e8c0bb90c3db163def.tar.gz |
fs: add do_pipe2() helper; remove internal call to sys_pipe2()
Using this helper removes an in-kernel call to the sys_pipe2() syscall.
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 'fs/pipe.c')
-rw-r--r-- | fs/pipe.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -841,7 +841,7 @@ int do_pipe_flags(int *fd, int flags) * sys_pipe() is the normal C calling standard for creating * a pipe. It's not the way Unix traditionally does this, though. */ -SYSCALL_DEFINE2(pipe2, int __user *, fildes, int, flags) +static int do_pipe2(int __user *fildes, int flags) { struct file *files[2]; int fd[2]; @@ -863,9 +863,14 @@ SYSCALL_DEFINE2(pipe2, int __user *, fildes, int, flags) return error; } +SYSCALL_DEFINE2(pipe2, int __user *, fildes, int, flags) +{ + return do_pipe2(fildes, flags); +} + SYSCALL_DEFINE1(pipe, int __user *, fildes) { - return sys_pipe2(fildes, 0); + return do_pipe2(fildes, 0); } static int wait_for_partner(struct pipe_inode_info *pipe, unsigned int *cnt) |