[Ocfs2-commits] jlbec commits r1297 - trunk/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Thu Jul 22 17:23:58 CDT 2004


Author: jlbec
Date: 2004-07-22 16:23:56 -0500 (Thu, 22 Jul 2004)
New Revision: 1297

Modified:
   trunk/src/super.c
   trunk/src/sysfile.c
Log:

o Fix failed get_system_inode.
o Print a sane error message on the same.



Modified: trunk/src/super.c
===================================================================
--- trunk/src/super.c	2004-07-22 20:55:01 UTC (rev 1296)
+++ trunk/src/super.c	2004-07-22 21:23:56 UTC (rev 1297)
@@ -234,6 +234,8 @@
 		if (!new) {
 			ocfs_release_system_inodes(osb);
 			LOG_ERROR_STATUS(status = -EINVAL);
+			/* FIXME: Should ERROR_RO_FS */
+			LOG_ERROR_ARGS("Unable to load system inode %d, possibly corrupt fs?", i);
 			goto bail;
 		}
 		// the array now has one ref, so drop this one

Modified: trunk/src/sysfile.c
===================================================================
--- trunk/src/sysfile.c	2004-07-22 20:55:01 UTC (rev 1296)
+++ trunk/src/sysfile.c	2004-07-22 21:23:56 UTC (rev 1297)
@@ -74,7 +74,7 @@
 	if (is_in_system_inode_array(osb, type, node))
 		arr = &(osb->system_inodes[type]);
 
-	if (arr && (inode = *arr) != NULL) {
+	if (arr && ((inode = *arr) != NULL)) {
 		/* get a ref in addition to the array ref */
 		inode = igrab(inode);
 		if (!inode)
@@ -87,7 +87,7 @@
 	inode = _ocfs_get_system_file_inode(osb, type, node);
 
 	/* add one more if putting into array for first time */
-	if (arr) {
+	if (arr && inode) {
 		*arr = igrab(inode);
 		if (!*arr)
 			BUG();



More information about the Ocfs2-commits mailing list