Skip to content

Commit

Permalink
fs: remove ksys_fchmod
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 bc1cd99 commit b25ba7c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
7 changes: 1 addition & 6 deletions fs/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ int vfs_fchmod(struct file *file, umode_t mode)
return chmod_common(&file->f_path, mode);
}

int ksys_fchmod(unsigned int fd, umode_t mode)
SYSCALL_DEFINE2(fchmod, unsigned int, fd, umode_t, mode)
{
struct fd f = fdget(fd);
int err = -EBADF;
Expand All @@ -620,11 +620,6 @@ int ksys_fchmod(unsigned int fd, umode_t mode)
return err;
}

SYSCALL_DEFINE2(fchmod, unsigned int, fd, umode_t, mode)
{
return ksys_fchmod(fd, mode);
}

int do_fchmodat(int dfd, const char __user *filename, umode_t mode)
{
struct path path;
Expand Down
1 change: 0 additions & 1 deletion include/linux/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,6 @@ int ksys_umount(char __user *name, int flags);
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);
int ksys_fchmod(unsigned int fd, umode_t mode);
int ksys_fchown(unsigned int fd, uid_t user, gid_t group);
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);
Expand Down

0 comments on commit b25ba7c

Please sign in to comment.