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 changed files with 30 additions and 12 deletions

View File

@@ -530,7 +530,7 @@ out:
return error;
}
int ksys_chroot(const char __user *filename)
SYSCALL_DEFINE1(chroot, const char __user *, filename)
{
struct path path;
int error;
@@ -563,11 +563,6 @@ out:
return error;
}
SYSCALL_DEFINE1(chroot, const char __user *, filename)
{
return ksys_chroot(filename);
}
static int chmod_common(const struct path *path, umode_t mode)
{
struct inode *inode = path->dentry->d_inode;