diff options
author | Christoph Hellwig <hch@lst.de> | 2020-07-21 11:12:08 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-07-31 08:17:51 +0200 |
commit | c60166f04283ffba7b88b45d824bbfb2bfccee24 (patch) | |
tree | 511e51f8ae0e91e50742bf73ccbe302e8b14a313 /init/do_mounts.c | |
parent | init: mark create_dev as __init (diff) | |
download | linux-c60166f04283ffba7b88b45d824bbfb2bfccee24.tar.xz linux-c60166f04283ffba7b88b45d824bbfb2bfccee24.zip |
init: add an init_mount helper
Like do_mount, but takes a kernel pointer for the destination path.
Switch over the mounts in the init code and devtmpfs to it, which
just happen to work due to the implicit set_fs(KERNEL_DS) during early
init right now.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'init/do_mounts.c')
-rw-r--r-- | init/do_mounts.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c index a7f22cf58c7e..83db87b6e5d1 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -395,16 +395,16 @@ static int __init do_mount_root(const char *name, const char *fs, int ret; if (data) { - /* do_mount() requires a full page as fifth argument */ + /* init_mount() requires a full page as fifth argument */ p = alloc_page(GFP_KERNEL); if (!p) return -ENOMEM; data_page = page_address(p); - /* zero-pad. do_mount() will make sure it's terminated */ + /* zero-pad. init_mount() will make sure it's terminated */ strncpy(data_page, data, PAGE_SIZE); } - ret = do_mount(name, "/root", fs, flags, data_page); + ret = init_mount(name, "/root", fs, flags, data_page); if (ret) goto out; @@ -628,7 +628,7 @@ void __init prepare_namespace(void) mount_root(); out: devtmpfs_mount(); - do_mount(".", "/", NULL, MS_MOVE, NULL); + init_mount(".", "/", NULL, MS_MOVE, NULL); ksys_chroot("."); } |