]> Devi Nivas Git - cs3210-lab1.git/commitdiff
fix bug fix
authorrsc <rsc>
Sun, 31 May 2009 01:53:08 +0000 (01:53 +0000)
committerrsc <rsc>
Sun, 31 May 2009 01:53:08 +0000 (01:53 +0000)
fs.c

diff --git a/fs.c b/fs.c
index c03d69b778aaaaaf6719235ae0b5034f481aecad..46179d43f2a8baea0ccfc6320aa818ebd090665a 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -227,7 +227,7 @@ iunlock(struct inode *ip)
     panic("iunlock");
 
   acquire(&icache.lock);
-  ip->flags = 0;
+  ip->flags &= ~I_BUSY;
   wakeup(ip);
   release(&icache.lock);
 }
@@ -247,7 +247,7 @@ iput(struct inode *ip)
     ip->type = 0;
     iupdate(ip);
     acquire(&icache.lock);
-    ip->flags &= ~I_BUSY;
+    ip->flags = 0;
     wakeup(ip);
   }
   ip->ref--;