summaryrefslogtreecommitdiffstats
path: root/fs/file.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2018-10-23 16:24:09 +0200
committerDominik Brodowski <linux@dominikbrodowski.net>2019-12-12 19:00:36 +0100
commit8243186f0cc7c57cf9d6a110cd7315c44e3e0be8 (patch)
tree16ca25ed6b291eb41de0d11b383fa7a263ad1121 /fs/file.c
parentinit: unify opening /dev/console as stdin/stdout/stderr (diff)
downloadlinux-8243186f0cc7c57cf9d6a110cd7315c44e3e0be8.tar.xz
linux-8243186f0cc7c57cf9d6a110cd7315c44e3e0be8.zip
fs: remove ksys_dup()
ksys_dup() is used only at one place in the kernel, namely to duplicate fd 0 of /dev/console to stdout and stderr. The same functionality can be achieved by using functions already available within the kernel namespace. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'fs/file.c')
-rw-r--r--fs/file.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/file.c b/fs/file.c
index 3da91a112bab..2f4fcf985079 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -960,7 +960,7 @@ SYSCALL_DEFINE2(dup2, unsigned int, oldfd, unsigned int, newfd)
return ksys_dup3(oldfd, newfd, 0);
}
-int ksys_dup(unsigned int fildes)
+SYSCALL_DEFINE1(dup, unsigned int, fildes)
{
int ret = -EBADF;
struct file *file = fget_raw(fildes);
@@ -975,11 +975,6 @@ int ksys_dup(unsigned int fildes)
return ret;
}
-SYSCALL_DEFINE1(dup, unsigned int, fildes)
-{
- return ksys_dup(fildes);
-}
-
int f_dupfd(unsigned int from, struct file *file, unsigned flags)
{
int err;