summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2018-03-13 21:34:04 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2018-03-25 20:10:44 +0200
commit0c8e2b74e029a102abae4f012ddc04831a445365 (patch)
treeed786624d90375f37d0eedb1dae0a45b02fc3572 /init
parent744bf999b48a5ebeb3ada8505e29f793b66596c8 (diff)
downloadlinux-next-0c8e2b74e029a102abae4f012ddc04831a445365.tar.gz
fs: add ksys_getdents64() helper; remove in-kernel calls to sys_getdents64()
Using this helper allows us to avoid the in-kernel calls to the sys_getdents64() 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_getdents64(). 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 'init')
-rw-r--r--init/initramfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/init/initramfs.c b/init/initramfs.c
index 5f2ff1d2370e..13643c46ebab 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -579,7 +579,7 @@ static void __init clean_rootfs(void)
}
dirp = buf;
- num = sys_getdents64(fd, dirp, BUF_SIZE);
+ num = ksys_getdents64(fd, dirp, BUF_SIZE);
while (num > 0) {
while (num > 0) {
struct kstat st;
@@ -599,7 +599,7 @@ static void __init clean_rootfs(void)
}
dirp = buf;
memset(buf, 0, BUF_SIZE);
- num = sys_getdents64(fd, dirp, BUF_SIZE);
+ num = ksys_getdents64(fd, dirp, BUF_SIZE);
}
ksys_close(fd);