Skip to content

Commit

Permalink
fs: remove ksys_dup
Browse files Browse the repository at this point in the history
Fold it into the only remaining caller.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Christoph Hellwig committed Jul 31, 2020
1 parent 166e07c commit bc1cd99
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
7 changes: 1 addition & 6 deletions fs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,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);
Expand All @@ -1000,11 +1000,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;
Expand Down
1 change: 0 additions & 1 deletion include/linux/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,6 @@ asmlinkage long sys_ni_syscall(void);
*/

int ksys_umount(char __user *name, int flags);
int ksys_dup(unsigned int fildes);
int ksys_chroot(const char __user *filename);
ssize_t ksys_write(unsigned int fd, const char __user *buf, size_t count);
int ksys_chdir(const char __user *filename);
Expand Down

0 comments on commit bc1cd99

Please sign in to comment.