mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
s390/compat: add sync_file_range and fallocate compat syscalls
The compat syscall wrappers for sync_file_range and fallocate merged 32 bit parameters into 64 bit parameters. Therefore they did more than just the usual zero and/or sign extension of system call parameters. So convert these two wrappers to full s390 specific compat sytem calls. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
This commit is contained in:
parent
00fcb1494f
commit
2c81fc4fb4
4 changed files with 19 additions and 20 deletions
|
@ -504,3 +504,17 @@ COMPAT_SYSCALL_DEFINE1(s390_fadvise64_64, struct fadvise64_64_args __user *, arg
|
|||
a.advice = POSIX_FADV_NOREUSE;
|
||||
return sys_fadvise64_64(a.fd, a.offset, a.len, a.advice);
|
||||
}
|
||||
|
||||
COMPAT_SYSCALL_DEFINE6(s390_sync_file_range, int, fd, u32, offhigh, u32, offlow,
|
||||
u32, nhigh, u32, nlow, unsigned int, flags)
|
||||
{
|
||||
return sys_sync_file_range(fd, ((loff_t)offhigh << 32) + offlow,
|
||||
((u64)nhigh << 32) + nlow, flags);
|
||||
}
|
||||
|
||||
COMPAT_SYSCALL_DEFINE6(s390_fallocate, int, fd, int, mode, u32, offhigh, u32, offlow,
|
||||
u32, lenhigh, u32, lenlow)
|
||||
{
|
||||
return sys_fallocate(fd, mode, ((loff_t)offhigh << 32) + offlow,
|
||||
((u64)lenhigh << 32) + lenlow);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue