[Ocfs2-commits] smushran commits r2282 - trunk/fs/ocfs2
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Wed May 18 19:41:00 CDT 2005
Author: smushran
Signed-off-by: mfasheh
Date: 2005-05-18 19:40:58 -0500 (Wed, 18 May 2005)
New Revision: 2282
Modified:
trunk/fs/ocfs2/inode.c
trunk/fs/ocfs2/super.c
Log:
fixed root inode refcnt
Signed-off-by: mfasheh
Modified: trunk/fs/ocfs2/inode.c
===================================================================
--- trunk/fs/ocfs2/inode.c 2005-05-18 20:51:04 UTC (rev 2281)
+++ trunk/fs/ocfs2/inode.c 2005-05-19 00:40:58 UTC (rev 2282)
@@ -743,8 +743,8 @@
OCFS_I(inode)->ip_blkno, inode->i_nlink);
osb = OCFS2_SB(inode->i_sb);
- if (!osb)
- goto bail;
+ mlog_bug_on_msg(osb == NULL,
+ "Inode=%lu\n", inode->i_ino);
if (!inode->u.generic_ip) {
mlog(ML_ERROR, "inode %lu has no generic_ip!\n", inode->i_ino);
Modified: trunk/fs/ocfs2/super.c
===================================================================
--- trunk/fs/ocfs2/super.c 2005-05-18 20:51:04 UTC (rev 2281)
+++ trunk/fs/ocfs2/super.c 2005-05-19 00:40:58 UTC (rev 2282)
@@ -241,6 +241,12 @@
osb->sys_root_inode = NULL;
}
+ inode = osb->root_inode;
+ if (inode) {
+ iput(inode);
+ osb->root_inode = NULL;
+ }
+
mlog_exit(status);
return status;
} /* ocfs_release_system_inodes */
@@ -315,7 +321,7 @@
* pull it off for proper cleanup. */
osb = OCFS2_SB(sb);
if (osb && osb->root_inode)
- inode = osb->root_inode;
+ inode = igrab(osb->root_inode);
if (status < 0)
goto read_super_error;
@@ -338,8 +344,6 @@
if (!root) {
status = -ENOMEM;
mlog_errno(status);
- iput (inode);
- inode = NULL;
goto read_super_error;
}
@@ -358,15 +362,15 @@
return status;
read_super_error:
+ if (inode)
+ iput (inode);
+
if (osb) {
atomic_set(&osb->vol_state, VOLUME_DISABLED);
wake_up(&osb->osb_mount_event);
ocfs_dismount_volume (sb, 1);
}
- if (inode)
- iput (inode);
-
mlog_exit(status);
return status;
}
More information about the Ocfs2-commits
mailing list