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

Commit 4474a331 authored by Helge Deller's avatar Helge Deller
Browse files

parisc: fix fallocate syscall



fallocate(off_t) gets redirected by glibc to fallocate64(loff_t)
where the 64bit loff_t values get splitted into two 32bit (hi/lo)
values. This patch fixes this syscall for the 32- and 64bit kernel.

Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 2e800dff
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -213,6 +213,13 @@ asmlinkage long parisc_sync_file_range(int fd,
			(loff_t)hi_nbytes << 32 | lo_nbytes, flags);
			(loff_t)hi_nbytes << 32 | lo_nbytes, flags);
}
}


asmlinkage long parisc_fallocate(int fd, int mode, u32 offhi, u32 offlo,
				u32 lenhi, u32 lenlo)
{
        return sys_fallocate(fd, mode, ((u64)offhi << 32) | offlo,
                             ((u64)lenhi << 32) | lenlo);
}

asmlinkage unsigned long sys_alloc_hugepages(int key, unsigned long addr, unsigned long len, int prot, int flag)
asmlinkage unsigned long sys_alloc_hugepages(int key, unsigned long addr, unsigned long len, int prot, int flag)
{
{
	return -ENOMEM;
	return -ENOMEM;
+0 −7
Original line number Original line Diff line number Diff line
@@ -142,13 +142,6 @@ long sys32_lookup_dcookie(u32 cookie_high, u32 cookie_low, char __user *buf,
				  buf, len);
				  buf, len);
}
}


asmlinkage long compat_sys_fallocate(int fd, int mode, u32 offhi, u32 offlo,
				u32 lenhi, u32 lenlo)
{
        return sys_fallocate(fd, mode, ((loff_t)offhi << 32) | offlo,
                             ((loff_t)lenhi << 32) | lenlo);
}

asmlinkage long compat_sys_fanotify_mark(int fan_fd, int flags, u32 mask_hi,
asmlinkage long compat_sys_fanotify_mark(int fan_fd, int flags, u32 mask_hi,
					 u32 mask_lo, int fd,
					 u32 mask_lo, int fd,
					 const char __user *pathname)
					 const char __user *pathname)
+1 −1
Original line number Original line Diff line number Diff line
@@ -403,7 +403,7 @@
	ENTRY_COMP(signalfd)
	ENTRY_COMP(signalfd)
	ENTRY_SAME(ni_syscall)		/* was timerfd */
	ENTRY_SAME(ni_syscall)		/* was timerfd */
	ENTRY_SAME(eventfd)
	ENTRY_SAME(eventfd)
	ENTRY_COMP(fallocate)		/* 305 */
	ENTRY_OURS(fallocate)		/* 305 */
	ENTRY_SAME(timerfd_create)
	ENTRY_SAME(timerfd_create)
	ENTRY_COMP(timerfd_settime)
	ENTRY_COMP(timerfd_settime)
	ENTRY_COMP(timerfd_gettime)
	ENTRY_COMP(timerfd_gettime)