Skip to content

Commit fb2da16

Browse files
author
Christoph Hellwig
committed
fs: remove ksys_getdents64
Just open code it in the only caller. Signed-off-by: Christoph Hellwig <[email protected]> Acked-by: Linus Torvalds <[email protected]>
1 parent 8f74063 commit fb2da16

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

fs/readdir.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,8 @@ static int filldir64(struct dir_context *ctx, const char *name, int namlen,
348348
return -EFAULT;
349349
}
350350

351-
int ksys_getdents64(unsigned int fd, struct linux_dirent64 __user *dirent,
352-
unsigned int count)
351+
SYSCALL_DEFINE3(getdents64, unsigned int, fd,
352+
struct linux_dirent64 __user *, dirent, unsigned int, count)
353353
{
354354
struct fd f;
355355
struct getdents_callback64 buf = {
@@ -380,13 +380,6 @@ int ksys_getdents64(unsigned int fd, struct linux_dirent64 __user *dirent,
380380
return error;
381381
}
382382

383-
384-
SYSCALL_DEFINE3(getdents64, unsigned int, fd,
385-
struct linux_dirent64 __user *, dirent, unsigned int, count)
386-
{
387-
return ksys_getdents64(fd, dirent, count);
388-
}
389-
390383
#ifdef CONFIG_COMPAT
391384
struct compat_old_linux_dirent {
392385
compat_ulong_t d_ino;

include/linux/syscalls.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,8 +1243,6 @@ ssize_t ksys_write(unsigned int fd, const char __user *buf, size_t count);
12431243
int ksys_chdir(const char __user *filename);
12441244
int ksys_fchmod(unsigned int fd, umode_t mode);
12451245
int ksys_fchown(unsigned int fd, uid_t user, gid_t group);
1246-
int ksys_getdents64(unsigned int fd, struct linux_dirent64 __user *dirent,
1247-
unsigned int count);
12481246
int ksys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg);
12491247
ssize_t ksys_read(unsigned int fd, char __user *buf, size_t count);
12501248
void ksys_sync(void);

0 commit comments

Comments
 (0)