diff --git a/src/userprog/syscall.c b/src/userprog/syscall.c index 2f07d1b..3efe7b5 100644 --- a/src/userprog/syscall.c +++ b/src/userprog/syscall.c @@ -348,12 +348,7 @@ syscall_seek (int fd, unsigned position) /* Find the file from the FD. If it does not exist, do nothing. */ struct open_file *file_info = fd_get_file (fd); if (file_info != NULL) - { - /* File exists: Acquire the file system lock to prevent race conditions. */ - lock_acquire (&filesys_lock); file_seek (file_info->file, position); - lock_release (&filesys_lock); - } } /* Handles the syscall for returning the next byte in a file referenced by @@ -367,10 +362,7 @@ syscall_tell (int fd) if (file_info == NULL) return 0; - /* Acquire the file system lock to prevent race conditions. */ - lock_acquire (&filesys_lock); unsigned pos = file_tell (file_info->file); - lock_release (&filesys_lock); /* Return the current position in the file. */ return pos;