Skip to content

Commit

Permalink
fs: remove ksys_getdents64
Browse files Browse the repository at this point in the history
Just open code it in the only 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 8f74063 commit fb2da16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
11 changes: 2 additions & 9 deletions fs/readdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ static int filldir64(struct dir_context *ctx, const char *name, int namlen,
return -EFAULT;
}

int ksys_getdents64(unsigned int fd, struct linux_dirent64 __user *dirent,
unsigned int count)
SYSCALL_DEFINE3(getdents64, unsigned int, fd,
struct linux_dirent64 __user *, dirent, unsigned int, count)
{
struct fd f;
struct getdents_callback64 buf = {
Expand Down Expand Up @@ -380,13 +380,6 @@ int ksys_getdents64(unsigned int fd, struct linux_dirent64 __user *dirent,
return error;
}


SYSCALL_DEFINE3(getdents64, unsigned int, fd,
struct linux_dirent64 __user *, dirent, unsigned int, count)
{
return ksys_getdents64(fd, dirent, count);
}

#ifdef CONFIG_COMPAT
struct compat_old_linux_dirent {
compat_ulong_t d_ino;
Expand Down
2 changes: 0 additions & 2 deletions include/linux/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -1243,8 +1243,6 @@ ssize_t ksys_write(unsigned int fd, const char __user *buf, size_t count);
int ksys_chdir(const char __user *filename);
int ksys_fchmod(unsigned int fd, umode_t mode);
int ksys_fchown(unsigned int fd, uid_t user, gid_t group);
int ksys_getdents64(unsigned int fd, struct linux_dirent64 __user *dirent,
unsigned int count);
int ksys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg);
ssize_t ksys_read(unsigned int fd, char __user *buf, size_t count);
void ksys_sync(void);
Expand Down

0 comments on commit fb2da16

Please sign in to comment.