From: Ben Pfaff Date: Tue, 21 Jun 2005 00:27:03 +0000 (+0000) Subject: Fix releasing of free inode blocks. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71ea8b14adfbb3f38a1fb2ced75ea5c513206e8f;p=pintos-anon Fix releasing of free inode blocks. --- diff --git a/src/filesys/inode.c b/src/filesys/inode.c index bd68167..98dd36a 100644 --- a/src/filesys/inode.c +++ b/src/filesys/inode.c @@ -164,9 +164,12 @@ inode_close (struct inode *inode) list_remove (&inode->elem); /* Deallocate blocks if removed. */ - if (inode->removed) - free_map_release (inode->sector, - bytes_to_sectors (inode->data.length)); + if (inode->removed) + { + free_map_release (inode->sector, 1); + free_map_release (inode->data.start, + bytes_to_sectors (inode->data.length)); + } free (inode); }