Skip to content

Commit

Permalink
rv32:syscall: fix fallocate|fadvise64_64|ftruncate64|pread64|pwrite64
Browse files Browse the repository at this point in the history
Signed-off-by: hanyu.cp <hanyu.cp@alibaba-inc.com>
  • Loading branch information
cp0613 authored and guoren83 committed Feb 24, 2024
1 parent a9b707f commit 14ccb41
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions fs/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ COMPAT_SYSCALL_DEFINE2(ftruncate, unsigned int, fd, compat_ulong_t, length)

/* LFS versions of truncate are only needed on 32 bit machines */
#if BITS_PER_LONG == 32
#ifdef CONFIG_ARCH_HAS_64ILP32_KERNEL
#if defined(CONFIG_ARCH_HAS_64ILP32_KERNEL) || defined(CONFIG_ARCH_RV32I)
SYSCALL_DEFINE3(truncate64, const char __user *, path, compat_arg_u64_dual(length))
{
return do_sys_truncate(path, compat_arg_u64_glue(length));
Expand Down Expand Up @@ -362,7 +362,7 @@ int ksys_fallocate(int fd, int mode, loff_t offset, loff_t len)
return error;
}

#ifdef CONFIG_ARCH_HAS_64ILP32_KERNEL
#if defined(CONFIG_ARCH_HAS_64ILP32_KERNEL) || defined(CONFIG_ARCH_RV32I)
SYSCALL_DEFINE6(fallocate, int, fd, int, mode,
compat_arg_u64_dual(offset),
compat_arg_u64_dual(len))
Expand Down
4 changes: 2 additions & 2 deletions fs/read_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ ssize_t ksys_pread64(unsigned int fd, char __user *buf, size_t count,
return ret;
}

#ifdef CONFIG_ARCH_HAS_64ILP32_KERNEL
#if defined(CONFIG_ARCH_HAS_64ILP32_KERNEL) || defined(CONFIG_ARCH_RV32I)
SYSCALL_DEFINE5(pread64, unsigned int, fd, char __user *, buf,
size_t, count, compat_arg_u64_dual(pos))
{
Expand Down Expand Up @@ -711,7 +711,7 @@ ssize_t ksys_pwrite64(unsigned int fd, const char __user *buf,
return ret;
}

#ifdef CONFIG_ARCH_HAS_64ILP32_KERNEL
#if defined(CONFIG_ARCH_HAS_64ILP32_KERNEL) || defined(CONFIG_ARCH_RV32I)
SYSCALL_DEFINE5(pwrite64, unsigned int, fd, const char __user *, buf,
size_t, count, compat_arg_u64_dual(pos))
{
Expand Down
2 changes: 1 addition & 1 deletion mm/fadvise.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ int ksys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice)
return ret;
}

#ifdef CONFIG_ARCH_HAS_64ILP32_KERNEL
#if defined(CONFIG_ARCH_HAS_64ILP32_KERNEL) || defined(CONFIG_ARCH_RV32I)

SYSCALL_DEFINE6(fadvise64_64, int, fd, compat_arg_u64_dual(offset),
compat_arg_u64_dual(len), int, advice)
Expand Down

0 comments on commit 14ccb41

Please sign in to comment.