Skip to content

Commit

Permalink
powerpc: Use generic fallocate compatibility syscall
Browse files Browse the repository at this point in the history
The powerpc fallocate compat syscall handler is identical to the
generic implementation provided by commit 59c10c5 ("riscv:
compat: syscall: Add compat_sys_call_table implementation"), and as
such can be removed in favour of the generic implementation.

A future patch series will replace more architecture-defined syscall
handlers with generic implementations, dependent on introducing generic
implementations that are compatible with powerpc and arm's parameter
reorderings.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220921065605.1051927-11-rmclure@linux.ibm.com
  • Loading branch information
Rohan McLure authored and Michael Ellerman committed Sep 26, 2022
1 parent 43d5de2 commit c2e7a19
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
2 changes: 0 additions & 2 deletions arch/powerpc/include/asm/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ compat_ssize_t compat_sys_readahead(int fd, u32 r4, u32 offset1, u32 offset2, u3
int compat_sys_truncate64(const char __user *path, u32 reg4,
unsigned long len1, unsigned long len2);

long compat_sys_fallocate(int fd, int mode, u32 offset1, u32 offset2, u32 len1, u32 len2);

int compat_sys_ftruncate64(unsigned int fd, u32 reg4, unsigned long len1,
unsigned long len2);

Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#define __ARCH_WANT_SYS_UTIME
#define __ARCH_WANT_SYS_NEWFSTATAT
#define __ARCH_WANT_COMPAT_STAT
#define __ARCH_WANT_COMPAT_FALLOCATE
#define __ARCH_WANT_COMPAT_SYS_SENDFILE
#endif
#define __ARCH_WANT_SYS_FORK
Expand Down
7 changes: 0 additions & 7 deletions arch/powerpc/kernel/sys_ppc32.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,6 @@ int compat_sys_truncate64(const char __user * path, u32 reg4,
return ksys_truncate(path, merge_64(len1, len2));
}

long compat_sys_fallocate(int fd, int mode, u32 offset1, u32 offset2,
u32 len1, u32 len2)
{
return ksys_fallocate(fd, mode, merge_64(offset1, offset2),
merge_64(len1, len2));
}

int compat_sys_ftruncate64(unsigned int fd, u32 reg4, unsigned long len1,
unsigned long len2)
{
Expand Down

0 comments on commit c2e7a19

Please sign in to comment.