aboutsummaryrefslogtreecommitdiffstats
path: root/init/noinitramfs.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-07-22 11:14:59 +0200
committerChristoph Hellwig <hch@lst.de>2020-07-31 08:17:53 +0200
commit83ff98c3e9cd2b82b4289e185f2ce7d635a9cbd3 (patch)
treec45bf0dfc39594f8787be068175f50a9d124cc9e /init/noinitramfs.c
parentinit: add an init_symlink helper (diff)
downloadlinux-dev-83ff98c3e9cd2b82b4289e185f2ce7d635a9cbd3.tar.xz
linux-dev-83ff98c3e9cd2b82b4289e185f2ce7d635a9cbd3.zip
init: add an init_mkdir helper
Add a simple helper to mkdir with a kernel space file name and switch the early init code over to it. Remove the now unused ksys_mkdir. Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'init/noinitramfs.c')
-rw-r--r--init/noinitramfs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/init/noinitramfs.c b/init/noinitramfs.c
index fa9cdfa7101d..94cc4df74b11 100644
--- a/init/noinitramfs.c
+++ b/init/noinitramfs.c
@@ -9,6 +9,7 @@
#include <linux/stat.h>
#include <linux/kdev_t.h>
#include <linux/syscalls.h>
+#include <linux/init_syscalls.h>
/*
* Create a simple rootfs that is similar to the default initramfs
@@ -17,7 +18,7 @@ static int __init default_rootfs(void)
{
int err;
- err = ksys_mkdir((const char __user __force *) "/dev", 0755);
+ err = init_mkdir("/dev", 0755);
if (err < 0)
goto out;
@@ -27,7 +28,7 @@ static int __init default_rootfs(void)
if (err < 0)
goto out;
- err = ksys_mkdir((const char __user __force *) "/root", 0700);
+ err = init_mkdir("/root", 0700);
if (err < 0)
goto out;