]> git.baikalelectronics.ru Git - kernel.git/commit
fs: add ksys_dup{,3}() helper; remove in-kernel calls to sys_dup{,3}()
authorDominik Brodowski <linux@dominikbrodowski.net>
Sun, 11 Mar 2018 10:34:40 +0000 (11:34 +0100)
committerDominik Brodowski <linux@dominikbrodowski.net>
Mon, 2 Apr 2018 18:15:49 +0000 (20:15 +0200)
commit2399a536db5d195ecaf11c4cdc471b684f1ee551
treeecd2b86a077f764e200b3c214cd1f851d4e3c6e0
parent12ab847507d78301336fa32c34b2f0a38424f0b2
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>
fs/file.c
include/linux/syscalls.h
init/do_mounts_initrd.c
init/main.c