[Ocfs2-commits] mfasheh commits r1698 - trunk/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Wed Dec 8 17:11:25 CST 2004
Author: mfasheh
Date: 2004-12-08 17:11:23 -0600 (Wed, 08 Dec 2004)
New Revision: 1698
Modified:
trunk/src/journal.c
trunk/src/namei.c
trunk/src/ocfs.h
Log:
* kill ocfs_inc_icount. We don't really need this anymore.
Modified: trunk/src/journal.c
===================================================================
--- trunk/src/journal.c 2004-12-08 02:17:42 UTC (rev 1697)
+++ trunk/src/journal.c 2004-12-08 23:11:23 UTC (rev 1698)
@@ -762,7 +762,7 @@
}
/* need to inc inode use count as journal_destroy will iput. */
- if (ocfs_inc_icount(inode) < 0)
+ if (!igrab(inode))
BUG();
num_running_trans = atomic_read(&(osb->journal->num_trans));
@@ -1157,7 +1157,7 @@
status = journal_load(k_journal);
if (status < 0) {
LOG_ERROR_STATUS(status);
- if (ocfs_inc_icount(inode) < 0)
+ if (!igrab(inode))
BUG();
journal_destroy(k_journal);
goto done;
@@ -1177,7 +1177,7 @@
if (status < 0)
LOG_ERROR_STATUS(status);
- if (ocfs_inc_icount(inode) < 0)
+ if (!igrab(inode))
BUG();
/* shutdown the journal */
Modified: trunk/src/namei.c
===================================================================
--- trunk/src/namei.c 2004-12-08 02:17:42 UTC (rev 1697)
+++ trunk/src/namei.c 2004-12-08 23:11:23 UTC (rev 1698)
@@ -1021,7 +1021,7 @@
osb = OCFS_SB(old_dir->i_sb);
if (new_inode) {
- if (ocfs_inc_icount(new_inode) < 0)
+ if (!igrab(new_inode))
BUG();
}
Modified: trunk/src/ocfs.h
===================================================================
--- trunk/src/ocfs.h 2004-12-08 02:17:42 UTC (rev 1697)
+++ trunk/src/ocfs.h 2004-12-08 23:11:23 UTC (rev 1698)
@@ -450,25 +450,6 @@
return (unsigned long)(blkno & (u64)ULONG_MAX);
}
-static inline int ocfs_inc_icount(struct inode *inode)
-{
- if (atomic_read(&inode->i_count) >= 1 &&
- !(inode->i_state & I_CLEAR)) {
- atomic_inc(&inode->i_count);
- return 0;
- }
-
- 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("inode=%llu, deleted=%u\n",
- OCFS_I(inode)->ip_blkno,
- INODE_DELETED(inode));
-
- return -EINVAL;
-}
-
typedef struct _ocfs_journal_handle ocfs_journal_handle;
#endif /* !OCFS_H */
More information about the Ocfs2-commits
mailing list