init: add an init_chroot helper

Add a simple helper to chroot with a kernel space file name and switch
the early init code over to it.  Remove the now unused ksys_chroot.

Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Christoph Hellwig
2020-07-22 11:26:13 +02:00
parent db63f1e315
commit 4b7ca5014c
7 ha cambiato i file con 30 aggiunte e 12 eliminazioni

Vedi File

@@ -629,7 +629,7 @@ void __init prepare_namespace(void)
out:
devtmpfs_mount();
init_mount(".", "/", NULL, MS_MOVE, NULL);
ksys_chroot(".");
init_chroot(".");
}
static bool is_tmpfs;