[Ocfs2-commits] manish commits r1004 - branches/format-changes/src/inc

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Fri Jun 4 17:53:25 CDT 2004


Author: manish
Date: 2004-06-04 16:53:23 -0500 (Fri, 04 Jun 2004)
New Revision: 1004

Modified:
   branches/format-changes/src/inc/ocfs.h
Log:
Fix up ocfs_inc_icount (warning about hard links). Should use igrab here
though.. From Christoph Hellwig.


Modified: branches/format-changes/src/inc/ocfs.h
===================================================================
--- branches/format-changes/src/inc/ocfs.h	2004-06-04 21:51:21 UTC (rev 1003)
+++ branches/format-changes/src/inc/ocfs.h	2004-06-04 21:53:23 UTC (rev 1004)
@@ -1761,33 +1761,20 @@
 
 static inline int ocfs_inc_icount(struct inode *inode)
 {
-	struct dentry *dentry = NULL;
-	struct list_head *iter;
-
 	if (atomic_read(&inode->i_count) >= 1 &&
 	    !(inode->i_state & I_CLEAR)) {
 		atomic_inc(&inode->i_count);
 		return 0;
 	}
 
-	list_for_each (iter, &(inode->i_dentry)) {
-		dentry = list_entry (iter, struct dentry, d_alias);
-#warning This cant be right in the land of hardlinks, can it?
-		// what the heck, take the first one ;-)
-		break;
-	}
+	LOG_ERROR_ARGS("eek! i_count=%d, i_state=%lu, i_ino=%lu, no dentry\n",
+		       atomic_read(&inode->i_count), inode->i_state,
+		       inode->i_ino);
 
-	if (dentry)
-		LOG_ERROR_ARGS("eek! i_count=%d, i_state=%lu, i_ino=%lu, name='%*s'\n",
-			       atomic_read(&inode->i_count), inode->i_state, inode->i_ino,
-			       dentry->d_name.len, dentry->d_name.name);
-	else
-		LOG_ERROR_ARGS("eek! i_count=%d, i_state=%lu, i_ino=%lu, no dentry\n",
-			       atomic_read(&inode->i_count), inode->i_state, inode->i_ino);
-
 	LOG_ERROR_ARGS("feoff=%llu, deleted=%u\n", 
 		       GET_INODE_FEOFF(inode),
 		       INODE_DELETED(inode));
+
 	return -EINVAL;
 }
 



More information about the Ocfs2-commits mailing list