]> Devi Nivas Git - cs3210-lab0.git/commitdiff
No one is going to find this inode.
authorrsc <rsc>
Tue, 28 Aug 2007 03:31:11 +0000 (03:31 +0000)
committerrsc <rsc>
Tue, 28 Aug 2007 03:31:11 +0000 (03:31 +0000)
There is only one ref to it -- the caller --
and no links to it.

fs.c

diff --git a/fs.c b/fs.c
index e92ffdad3a12aab3f86eccac60776790c5ead5c7..3c3f32a6c7c61354d7e2bb90652021e8fe24b2ee 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -243,12 +243,12 @@ iput(struct inode *ip)
       panic("iput busy");
     ip->flags |= I_BUSY;
     release(&icache.lock);
-    // XXX convince rsc that no one will come find this inode.
     itrunc(ip);
     ip->type = 0;
     iupdate(ip);
     acquire(&icache.lock);
     ip->flags &= ~I_BUSY;
+    wakeup(ip);
   }
   ip->ref--;
   release(&icache.lock);