From: Ben Pfaff Date: Thu, 23 Sep 2004 06:40:57 +0000 (+0000) Subject: Fix bitmap_scan_and_flip() calls. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=170cd194261030e62b40ccc913cdca9cdf7bc2af;p=pintos-anon Fix bitmap_scan_and_flip() calls. --- diff --git a/src/filesys/filesys.c b/src/filesys/filesys.c index 28a2f7f..05df4ce 100644 --- a/src/filesys/filesys.c +++ b/src/filesys/filesys.c @@ -166,8 +166,7 @@ filesys_create (const char *name, off_t initial_size) if (free_map == NULL) goto done; bitmap_read (free_map, free_map_file); - inode_sector = bitmap_scan_and_flip (free_map, 0, disk_size (filesys_disk), - false); + inode_sector = bitmap_scan_and_flip (free_map, 0, 1, false); if (inode_sector == BITMAP_ERROR) goto done; diff --git a/src/filesys/inode.c b/src/filesys/inode.c index c704148..d4d741e 100644 --- a/src/filesys/inode.c +++ b/src/filesys/inode.c @@ -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_scan_and_flip (b, 0, bitmap_size (b), false); + size_t sector = bitmap_scan_and_flip (b, 0, 1, false); if (sector == BITMAP_ERROR) goto error;