Turn off assertions when running in the kernel.
[pintos-anon] / src / filesys / inode.c
index dbec4b900ef882128ef1aefd1133b70ab8396fd1..d4d741e53c44c9121793333e5f58b55770982472 100644 (file)
@@ -72,7 +72,7 @@ inode_create (struct bitmap *b, disk_sector_t sector, off_t length)
   idx->data.length = length;
   while (idx->data.sector_cnt < sector_cnt)
     {
-      size_t sector = bitmap_find_and_set (b);
+      size_t sector = bitmap_scan_and_flip (b, 0, 1, false);
       if (sector == BITMAP_ERROR)
         goto error;