unix: add SyncFileRange on linux/arm

Use the arm_sync_file_range to implement SyncFileRange.

This is an alias for sync_file_range2 syscall which is already used to
implement SyncFileRange on ppc64x. These have the order of the flags and
offset arguments reversed in order to fit the syscall arguments within 6
registers.

For more information see:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=edd5cd4a9424f22b0fa08bef5e299d41befd5622

This makes TestSyncFileRange build and pass on linux/arm.

Change-Id: I1316328ebcf550a3fb70f9ce5ebf54d8bcaa932c
Reviewed-on: https://go-review.googlesource.com/c/153939
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/unix/syscall_linux_arm.go b/unix/syscall_linux_arm.go
index 3ec7a93..ad2bd25 100644
--- a/unix/syscall_linux_arm.go
+++ b/unix/syscall_linux_arm.go
@@ -257,3 +257,11 @@
 	}
 	return poll(&fds[0], len(fds), timeout)
 }
+
+//sys	armSyncFileRange(fd int, flags int, off int64, n int64) (err error) = SYS_ARM_SYNC_FILE_RANGE
+
+func SyncFileRange(fd int, off int64, n int64, flags int) error {
+	// The sync_file_range and arm_sync_file_range syscalls differ only in the
+	// order of their arguments.
+	return armSyncFileRange(fd, flags, off, n)
+}