anolis: file: re-add ksys_close
ANBZ: #19218 Some out-of-tree modules such as gpfs client may need ksys_close() which has been replaced by close_fd() in upstream. So re-add it so that customer don't have to adapt code. Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com> Reviewed-by: Ferry Meng <mengferry@linux.alibaba.com> Acked-by: Qiao Ma <mqaio@linux.alibaba.com> Acked-by: Shuai Xue <xueshuai@linux.alibaba.com> Link: https://gitee.com/anolis/cloud-kernel/pulls/4777
This commit is contained in:
parent
08ac2964db
commit
797aae63f0
|
@ -1325,6 +1325,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)
|
||||
|
|
Loading…
Reference in New Issue