Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4e9cffa authored by Ralf Baechle's avatar Ralf Baechle
Browse files

[MIPS] compat: handle argument endianess of sys32_(f)truncate64 with merge_64

parent 0e8774b6
Loading
Loading
Loading
Loading
+5 −25
Original line number Diff line number Diff line
@@ -174,36 +174,16 @@ struct rlimit32 {
	int	rlim_max;
};

#ifdef __MIPSEB__
asmlinkage long sys32_truncate64(const char __user * path, unsigned long __dummy,
	int length_hi, int length_lo)
#endif
#ifdef __MIPSEL__
asmlinkage long sys32_truncate64(const char __user * path, unsigned long __dummy,
	int length_lo, int length_hi)
#endif
asmlinkage long sys32_truncate64(const char __user * path,
	unsigned long __dummy, int a2, int a3)
{
	loff_t length;

	length = ((unsigned long) length_hi << 32) | (unsigned int) length_lo;

	return sys_truncate(path, length);
	return sys_truncate(path, merge_64(a2, a3));
}

#ifdef __MIPSEB__
asmlinkage long sys32_ftruncate64(unsigned int fd, unsigned long __dummy,
	int length_hi, int length_lo)
#endif
#ifdef __MIPSEL__
asmlinkage long sys32_ftruncate64(unsigned int fd, unsigned long __dummy,
	int length_lo, int length_hi)
#endif
	int a2, int a3)
{
	loff_t length;

	length = ((unsigned long) length_hi << 32) | (unsigned int) length_lo;

	return sys_ftruncate(fd, length);
	return sys_ftruncate(fd, merge_64(a2, a3));
}

static inline long