Revert "file: Replace ksys_close with close_fd"

This reverts commit d7b5b6740b.
This commit is contained in:
Ksawlii 2024-11-19 12:59:08 +01:00
parent f29c8d4d89
commit eef404784c
2 changed files with 14 additions and 3 deletions

View file

@ -4,10 +4,9 @@
* Copyright 2008 Ian Kent <raven@themaw.net>
*/
#include <linux/module.h>
#include <linux/miscdevice.h>
#include <linux/compat.h>
#include <linux/fdtable.h>
#include <linux/syscalls.h>
#include <linux/magic.h>
#include <linux/nospec.h>
@ -290,7 +289,7 @@ static int autofs_dev_ioctl_closemount(struct file *fp,
struct autofs_sb_info *sbi,
struct autofs_dev_ioctl *param)
{
return close_fd(param->ioctlfd);
return ksys_close(param->ioctlfd);
}
/*

View file

@ -1321,6 +1321,18 @@ static inline long ksys_ftruncate(unsigned int fd, loff_t length)
return do_sys_ftruncate(fd, length, 1);
}
extern int close_fd(unsigned int fd);
/*
* In contrast to sys_close(), this stub does not check whether the syscall
* should or should not be restarted, but returns the raw error codes from
* close_fd().
*/
static inline int ksys_close(unsigned int fd)
{
return close_fd(fd);
}
extern long do_sys_truncate(const char __user *pathname, loff_t length);
static inline long ksys_truncate(const char __user *pathname, loff_t length)