Some sharp-eyed people noticed something missing from an error-return
path in vfs_open. Patch follows, will be posted on the web site, etc.:
Index: src/kern/fs/vfs/vfspath.c
===================================================================
RCS file: /disk/disk0/cs161/CVSREPO/os161/src/kern/fs/vfs/vfspath.c,v
retrieving revision 1.5
diff -u -r1.5 vfspath.c
--- vfspath.c 2001/09/18 22:19:20 1.5
+++ vfspath.c 2002/04/16 23:40:49
@@ -74,6 +74,14 @@
result = VOP_TRUNCATE(vn, 0);
}
if (result) {
+ int result2 = VOP_DECOPEN(vn);
+ if (result2) {
+ /* Blah. What else can we do? */
+ panic("vfs_open: Error %d from VOP_DECOPEN "
+ "trying to recover from\n"
+ "error %d handling O_TRUNC\n",
+ result2, result);
+ }
VOP_DECREF(vn);
return result;
}
--
- David A. Holland / dholland(a)eecs.harvard.edu
Show replies by date