]> Pileus Git - ~andy/linux/commitdiff
parisc: fix fallocate syscall
authorHelge Deller <deller@gmx.de>
Tue, 19 Feb 2013 20:23:59 +0000 (21:23 +0100)
committerHelge Deller <deller@gmx.de>
Wed, 20 Feb 2013 21:57:12 +0000 (22:57 +0100)
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>
arch/parisc/kernel/sys_parisc.c
arch/parisc/kernel/sys_parisc32.c
arch/parisc/kernel/syscall_table.S

index a047b3227e503bf3a9fe23766d8dea14cf0ea2e8..54d619d4cac6107c0df8d7ccd5f111dd5e0486c0 100644 (file)
@@ -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;
index cee60f77fc1ff6900f329d1b0d660ea08344828a..986294425e86bfa4dc45fce75a518a7c905d9450 100644 (file)
@@ -142,13 +142,6 @@ long sys32_lookup_dcookie(u32 cookie_high, u32 cookie_low, char __user *buf,
                                  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,
                                         u32 mask_lo, int fd,
                                         const char __user *pathname)
index 773b4ee1e1d37d5b420c98dd9e265fa913071a5d..2a5f82985aa8f34951e22716b3a0128273d1018d 100644 (file)
        ENTRY_COMP(signalfd)
        ENTRY_SAME(ni_syscall)          /* was timerfd */
        ENTRY_SAME(eventfd)
-       ENTRY_COMP(fallocate)           /* 305 */
+       ENTRY_OURS(fallocate)           /* 305 */
        ENTRY_SAME(timerfd_create)
        ENTRY_COMP(timerfd_settime)
        ENTRY_COMP(timerfd_gettime)