summaryrefslogtreecommitdiffstats
path: root/init/do_mounts.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2018-03-11 11:34:39 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2018-04-02 20:15:48 +0200
commit312db1aa1dc7bff133d95c92efcc5e42b57cefa6 (patch)
treee62c8c554db9e30e7676d847fa75d189231895de /init/do_mounts.c
parentab0d1e85bfd0c25260f02cd3708d5abdfb5b5a9c (diff)
downloadop-kernel-dev-312db1aa1dc7bff133d95c92efcc5e42b57cefa6.zip
op-kernel-dev-312db1aa1dc7bff133d95c92efcc5e42b57cefa6.tar.gz
fs: add ksys_mount() helper; remove in-kernel calls to sys_mount()
Using this helper allows us to avoid the in-kernel calls to the sys_mount() 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_mount(). In the near future, all callers of ksys_mount() should be converted to call do_mount() directly. 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/do_mounts.c')
-rw-r--r--init/do_mounts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 7cf4f6d..eb768de 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -363,7 +363,7 @@ static void __init get_fs_names(char *page)
static int __init do_mount_root(char *name, char *fs, int flags, void *data)
{
struct super_block *s;
- int err = sys_mount(name, "/root", fs, flags, data);
+ int err = ksys_mount(name, "/root", fs, flags, data);
if (err)
return err;
@@ -599,7 +599,7 @@ void __init prepare_namespace(void)
mount_root();
out:
devtmpfs_mount("dev");
- sys_mount(".", "/", NULL, MS_MOVE, NULL);
+ ksys_mount(".", "/", NULL, MS_MOVE, NULL);
sys_chroot(".");
}
OpenPOWER on IntegriCloud