fs: add ksys_close() wrapper; remove in-kernel calls to sys_close()
Using the ksys_close() wrapper allows us to get rid of in-kernel calls to the sys_close() syscall. 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_close(), with one subtle difference: The few places which checked the return value did not care about the return value re-writing in sys_close(), so simply use a wrapper around __close_fd(). 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>
Showing
- fs/autofs4/dev-ioctl.c 1 addition, 1 deletionfs/autofs4/dev-ioctl.c
- fs/binfmt_misc.c 1 addition, 1 deletionfs/binfmt_misc.c
- fs/file.c 1 addition, 0 deletionsfs/file.c
- fs/open.c 0 additions, 1 deletionfs/open.c
- include/linux/syscalls.h 12 additions, 0 deletionsinclude/linux/syscalls.h
- init/do_mounts.c 2 additions, 2 deletionsinit/do_mounts.c
- init/do_mounts_initrd.c 1 addition, 1 deletioninit/do_mounts_initrd.c
- init/do_mounts_md.c 4 additions, 4 deletionsinit/do_mounts_md.c
- init/do_mounts_rd.c 3 additions, 3 deletionsinit/do_mounts_rd.c
- init/initramfs.c 4 additions, 4 deletionsinit/initramfs.c
Loading
Please register or sign in to comment