diff --git a/src/userprog/syscall.c b/src/userprog/syscall.c index c55c090..b1a43dd 100644 --- a/src/userprog/syscall.c +++ b/src/userprog/syscall.c @@ -472,7 +472,7 @@ syscall_mmap (int fd, void *addr) off_t read_bytes = file_size - ofs < PGSIZE ? file_size - ofs : PGSIZE; off_t zero_bytes = PGSIZE - read_bytes; - if (page_insert (file, ofs, addr + ofs, read_bytes, zero_bytes, true, + if (page_insert_file (file, ofs, addr + ofs, read_bytes, zero_bytes, true, PAGE_FILE) == NULL) return MMAP_FAILURE; }