[Ocfs2-commits] mfasheh commits r2446 - trunk/fs/ocfs2
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Wed Jun 29 16:21:18 CDT 2005
Author: mfasheh
Signed-off-by: manish
Date: 2005-06-29 16:21:17 -0500 (Wed, 29 Jun 2005)
New Revision: 2446
Modified:
trunk/fs/ocfs2/namei.c
Log:
* cleanup orphaned state on lookup. Should help avoid some unecessary
code branching later.
Signed-off-by: manish
Modified: trunk/fs/ocfs2/namei.c
===================================================================
--- trunk/fs/ocfs2/namei.c 2005-06-29 21:14:40 UTC (rev 2445)
+++ trunk/fs/ocfs2/namei.c 2005-06-29 21:21:17 UTC (rev 2446)
@@ -149,6 +149,7 @@
struct inode *inode = NULL;
struct dentry *ret;
struct ocfs2_dir_entry *dirent;
+ struct ocfs2_inode_info *oi;
mlog_entry("(0x%p, 0x%p, '%.*s')\n", dir, dentry,
dentry->d_name.len, dentry->d_name.name);
@@ -182,6 +183,17 @@
goto bail_unlock;
}
+ oi = OCFS2_I(inode);
+ /* Clear any orphaned state... If we were able to look up the
+ * inode from a directory, it certainly can't be orphaned. We
+ * might have the bad state from a node which intended to
+ * orphan this inode but crashed before it could commit the
+ * unlink. */
+ spin_lock(&oi->ip_lock);
+ oi->ip_flags &= ~OCFS2_INODE_MAYBE_ORPHANED;
+ oi->ip_orphaned_slot = OCFS2_INVALID_SLOT;
+ spin_unlock(&oi->ip_lock);
+
bail_add:
dentry->d_op = &ocfs2_dentry_ops;
More information about the Ocfs2-commits
mailing list