convert compat sync_file_range() to COMPAT_SYSCALL_DEFINE
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 20 Mar 2018 03:44:52 +0000 (23:44 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 20 Mar 2018 16:05:04 +0000 (12:05 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/sparc/kernel/sys_sparc32.c
arch/sparc/kernel/systbls.h
arch/sparc/kernel/systbls_64.S

index d01b99258de2021483227e0b9b7bd83b00747357..b266797fee99f028f9ffe3eaed2b607158a6ead4 100644 (file)
@@ -233,11 +233,12 @@ COMPAT_SYSCALL_DEFINE6(fadvise64_64, int, fd, u32, offhi, u32, offlo,
                                advice);
 }
 
-long sys32_sync_file_range(unsigned int fd, unsigned long off_high, unsigned long off_low, unsigned long nb_high, unsigned long nb_low, unsigned int flags)
+COMPAT_SYSCALL_DEFINE6(sync_file_range, unsigned int, fd, u32, off_high, u32, off_low,
+                       u32, nb_high, u32, nb_low, unsigned int, flags)
 {
        return sys_sync_file_range(fd,
-                                  (off_high << 32) | off_low,
-                                  (nb_high << 32) | nb_low,
+                                  ((u64)off_high << 32) | off_low,
+                                  ((u64)nb_high << 32) | nb_low,
                                   flags);
 }
 
index 9965273b588b23177ec7fb2bcf4cac4e39ce3e78..0ff3da78e09b1efdbd2e81ce1dc324a8d8540bf6 100644 (file)
@@ -87,9 +87,9 @@ long compat_sys_fadvise64_64(int fd,
                             unsigned offhi, unsigned offlo,
                             unsigned lenhi, unsigned lenlo,
                             int advice);
-long sys32_sync_file_range(unsigned int fd,
-                          unsigned long off_high, unsigned long off_low,
-                          unsigned long nb_high, unsigned long nb_low,
+long compat_sys_sync_file_range(unsigned int fd,
+                          unsigned off_high, unsigned off_low,
+                          unsigned nb_high, unsigned nb_low,
                           unsigned int flags);
 asmlinkage long compat_sys_fallocate(int fd, int mode, u32 offhi, u32 offlo,
                                     u32 lenhi, u32 lenlo);
index 96b6b64ce5798f2e6418229057407aac6daa2d4b..9d10daa5a121229a53ed0758b7d8ccd7d4129fdc 100644 (file)
@@ -70,7 +70,7 @@ sys_call_table32:
 /*240*/        .word sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler
        .word sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, compat_sys_sched_rr_get_interval, compat_sys_nanosleep
 /*250*/        .word sys_mremap, compat_sys_sysctl, sys_getsid, sys_fdatasync, sys_nis_syscall
-       .word sys32_sync_file_range, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, compat_sys_clock_nanosleep
+       .word compat_sys_sync_file_range, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, compat_sys_clock_nanosleep
 /*260*/        .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, compat_sys_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun
        .word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy
 /*270*/        .word compat_sys_io_submit, sys_io_cancel, compat_sys_io_getevents, compat_sys_mq_open, sys_mq_unlink