summaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/sys_parisc.c
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2013-02-19 21:23:59 +0100
committerHelge Deller <deller@gmx.de>2013-02-20 22:57:12 +0100
commit4474a331cfccc5092b79e3839205aacf44f3a571 (patch)
treeff25401a9891374af6774eeb5a72d33fc6bb13ce /arch/parisc/kernel/sys_parisc.c
parent2e800dff4f16a6e47adcbea7188fc586bfa5c30b (diff)
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: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/kernel/sys_parisc.c')
-rw-r--r--arch/parisc/kernel/sys_parisc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c
index a047b3227e5..54d619d4cac 100644
--- a/arch/parisc/kernel/sys_parisc.c
+++ b/arch/parisc/kernel/sys_parisc.c
@@ -213,6 +213,13 @@ asmlinkage long parisc_sync_file_range(int fd,
(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)
{
return -ENOMEM;