summaryrefslogtreecommitdiffstats
path: root/src/filesys/filesys.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/filesys/filesys.c')
-rw-r--r--src/filesys/filesys.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/filesys/filesys.c b/src/filesys/filesys.c
index 789bcf2..d30f728 100644
--- a/src/filesys/filesys.c
+++ b/src/filesys/filesys.c
@@ -7,7 +7,10 @@
#include "filesys/inode.h"
#include "filesys/directory.h"
#include "devices/disk.h"
+#include "threads/synch.h"
+/* Locks filesys_create so the same file isn't
+ created twice with the same name. */
static struct lock create_lock;
/* The disk that contains the file system. */