factor out syscall name checking in sync_file_range

we'll use it in other syscalls too.
handle mmap/mmap2 difference accordingly.