From: rtm Date: Mon, 20 Oct 2008 18:05:48 +0000 (+0000) Subject: Explain why itrunc() is OK w.r.t. crashes. X-Git-Url: https://git.devinivas.org/?a=commitdiff_plain;h=8eb20827c273df183986f95fc13cad8b28ea8ae6;p=cs3210-lab0.git Explain why itrunc() is OK w.r.t. crashes. --- diff --git a/fs.c b/fs.c index 70c7ec1..91533d1 100644 --- a/fs.c +++ b/fs.c @@ -359,6 +359,8 @@ bmap(struct inode *ip, uint bn, int alloc) } // Truncate inode (discard contents). +// Only called after the last dirent referring +// to this inode has been erased on disk. static void itrunc(struct inode *ip) {