author: Christoph Hellwig <hch@lst.de> 2020-07-22 11:14:59 +0200
committer: Christoph Hellwig <hch@lst.de> 2020-07-31 08:17:53 +0200
commit: 83ff98c3e9cd2b82b4289e185f2ce7d635a9cbd3
parent: cd3acb6a79349f346714ab3d26d203a0c6ca5ab0
Commit Summary:
Diffstat:
3 files changed, 5 insertions, 4 deletions
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index a6b447b191db..3f5ac81913dd 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -81,7 +81,7 @@ static void __init handle_initrd(void)
create_dev("/dev/root.old", Root_RAM0);
/* mount initrd on rootfs' /root */
mount_block_root("/dev/root.old", root_mountflags & ~MS_RDONLY);
- ksys_mkdir("/old", 0700);
+ init_mkdir("/old", 0700);
init_chdir("/old");
/*
diff --git a/init/initramfs.c b/init/initramfs.c
index c91fc9a51d2a..0489eb65b3b8 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -348,7 +348,7 @@ static int __init do_name(void)
state = CopyFile;
}
} else if (S_ISDIR(mode)) {
- ksys_mkdir(collected, mode);
+ init_mkdir(collected, mode);
init_chown(collected, uid, gid, 0);
init_chmod(collected, mode);
dir_add(collected, mtime);
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;