projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename putchar_unlocked() to putchar_have_lock() to avoid GCC warning.
[pintos-anon]
/
src
/
filesys
/
inode.c
diff --git
a/src/filesys/inode.c
b/src/filesys/inode.c
index 98dd36a1a9e5c62a537b2316d3b67bcd753f796d..8e954abc32f35c782cd04c9f0715a7291a86edbb 100644
(file)
--- a/
src/filesys/inode.c
+++ b/
src/filesys/inode.c
@@
-162,7
+162,7
@@
inode_close (struct inode *inode)
{
/* Remove from inode list and release lock. */
list_remove (&inode->elem);
{
/* Remove from inode list and release lock. */
list_remove (&inode->elem);
-
+
/* Deallocate blocks if removed. */
if (inode->removed)
{
/* Deallocate blocks if removed. */
if (inode->removed)
{
@@
-258,7
+258,7
@@
inode_write_at (struct inode *inode, const void *buffer_, off_t size,
while (size > 0)
{
/* Sector to write, starting byte offset within sector. */
while (size > 0)
{
/* Sector to write, starting byte offset within sector. */
-
off
_t sector_idx = byte_to_sector (inode, offset);
+
disk_sector
_t sector_idx = byte_to_sector (inode, offset);
int sector_ofs = offset % DISK_SECTOR_SIZE;
/* Bytes left in inode, bytes left in sector, lesser of the two. */
int sector_ofs = offset % DISK_SECTOR_SIZE;
/* Bytes left in inode, bytes left in sector, lesser of the two. */