Skip to content

Commit bc1cd99

Browse files
author
Christoph Hellwig
committed
fs: remove ksys_dup
Fold it into the only remaining caller. Signed-off-by: Christoph Hellwig <[email protected]> Acked-by: Linus Torvalds <[email protected]>
1 parent 166e07c commit bc1cd99

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

fs/file.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ SYSCALL_DEFINE2(dup2, unsigned int, oldfd, unsigned int, newfd)
985985
return ksys_dup3(oldfd, newfd, 0);
986986
}
987987

988-
int ksys_dup(unsigned int fildes)
988+
SYSCALL_DEFINE1(dup, unsigned int, fildes)
989989
{
990990
int ret = -EBADF;
991991
struct file *file = fget_raw(fildes);
@@ -1000,11 +1000,6 @@ int ksys_dup(unsigned int fildes)
10001000
return ret;
10011001
}
10021002

1003-
SYSCALL_DEFINE1(dup, unsigned int, fildes)
1004-
{
1005-
return ksys_dup(fildes);
1006-
}
1007-
10081003
int f_dupfd(unsigned int from, struct file *file, unsigned flags)
10091004
{
10101005
int err;

include/linux/syscalls.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1237,7 +1237,6 @@ asmlinkage long sys_ni_syscall(void);
12371237
*/
12381238

12391239
int ksys_umount(char __user *name, int flags);
1240-
int ksys_dup(unsigned int fildes);
12411240
int ksys_chroot(const char __user *filename);
12421241
ssize_t ksys_write(unsigned int fd, const char __user *buf, size_t count);
12431242
int ksys_chdir(const char __user *filename);

0 commit comments

Comments
 (0)