summaryrefslogtreecommitdiff
path: root/fs/open.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-07-22 12:25:21 +0300
committerChristoph Hellwig <hch@lst.de>2020-07-31 09:17:52 +0300
commitdb63f1e315384590b979f8f74abd1b5363b69894 (patch)
tree5bcaeab28afa531c24c028f1b40e8d4cadd9ce53 /fs/open.c
parent20cce026c3e0972017b9cb4a7cccfb8cacf187d5 (diff)
downloadlinux-db63f1e315384590b979f8f74abd1b5363b69894.tar.xz
init: add an init_chdir helper
Add a simple helper to chdir with a kernel space file name and switch the early init code over to it. Remove the now unused ksys_chdir. Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/open.c b/fs/open.c
index b316dd6a86a8..723e0ac89893 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -482,7 +482,7 @@ SYSCALL_DEFINE2(access, const char __user *, filename, int, mode)
return do_faccessat(AT_FDCWD, filename, mode, 0);
}
-int ksys_chdir(const char __user *filename)
+SYSCALL_DEFINE1(chdir, const char __user *, filename)
{
struct path path;
int error;
@@ -508,11 +508,6 @@ out:
return error;
}
-SYSCALL_DEFINE1(chdir, const char __user *, filename)
-{
- return ksys_chdir(filename);
-}
-
SYSCALL_DEFINE1(fchdir, unsigned int, fd)
{
struct fd f = fdget_raw(fd);