summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2018-10-23 17:24:09 +0300
committerDominik Brodowski <linux@dominikbrodowski.net>2019-12-12 21:00:36 +0300
commit8243186f0cc7c57cf9d6a110cd7315c44e3e0be8 (patch)
tree16ca25ed6b291eb41de0d11b383fa7a263ad1121 /fs
parentb49a733d684e0096340b93e9dfd471f0e3ddc06d (diff)
downloadlinux-8243186f0cc7c57cf9d6a110cd7315c44e3e0be8.tar.xz
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')
-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;