projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
206c771
)
Fix releasing of free inode blocks.
author
Ben Pfaff
<blp@cs.stanford.edu>
Tue, 21 Jun 2005 00:27:03 +0000
(
00:27
+0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Tue, 21 Jun 2005 00:27:03 +0000
(
00:27
+0000)
src/filesys/inode.c
patch
|
blob
|
history
diff --git
a/src/filesys/inode.c
b/src/filesys/inode.c
index bd68167baa1c5c4b2bcfd02c73b99c194e102c87..98dd36a1a9e5c62a537b2316d3b67bcd753f796d 100644
(file)
--- 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);
}