[Ocfs2-commits] mfasheh commits r1299 - trunk/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu Jul 22 20:29:28 CDT 2004
Author: mfasheh
Date: 2004-07-22 19:29:26 -0500 (Thu, 22 Jul 2004)
New Revision: 1299
Modified:
trunk/src/nm.c
Log:
* remove ocfs_search_committed -- it doesn't actually do anything
anymore.
Modified: trunk/src/nm.c
===================================================================
--- trunk/src/nm.c 2004-07-23 00:24:43 UTC (rev 1298)
+++ trunk/src/nm.c 2004-07-23 00:29:26 UTC (rev 1299)
@@ -61,7 +61,6 @@
struct semaphore recovery_list_sem;
static inline int get_process_vote_action(ocfs_super * osb, ocfs_lock_res *lockres, __u32 node_num, __u32 flags, int status, int *master_alive, struct inode *inode);
-static int ocfs_search_committed(ocfs_super *osb, struct inode *inode);
static int ocfs_schedule_process_vote(ocfs_super *osb, struct buffer_head *bh, int vote_node);
static int _ocfs_drop_readonly_cache_lock(void *arg);
@@ -657,40 +656,6 @@
return;
}
-/* Search the journals committed transactions list for a given
- * inode. If it's in there, return true, zero otherwise and -1 on
- * error. Must hold the journal->cmt_lock before going here! */
-static int ocfs_search_committed(ocfs_super *osb, struct inode *inode)
-{
- struct list_head *handle_p;
- struct list_head *lock_p;
- int found = 0;
- ocfs_journal *journal;
- ocfs_journal_handle *handle = NULL;
- ocfs_journal_lock *lock;
-
- LOG_ENTRY();
-
- journal = osb->journal;
-
- list_for_each(handle_p, &journal->committed) {
- handle = list_entry(handle_p, ocfs_journal_handle, h_list);
-
- list_for_each(lock_p, &(handle->locks)) {
- lock= list_entry(lock_p, ocfs_journal_lock, lock_list);
-
- if (inode == lock->inode) {
- found = 1;
- break;
- }
- }
- }
-
- LOG_EXIT_STATUS(found);
-
- return(found);
-}
-
/*
* ocfs_process_vote()
*
@@ -1029,13 +994,10 @@
OCFS_I(inode)->ip_blkno << inode->i_sb->s_blocksize_bits,
lockres->lock_holders);
#endif
- spin_lock(&(osb->journal->cmt_lock));
- if (ocfs_search_committed(osb, inode)) {
- // kick the commit thread
- atomic_set(&osb->flush_event_woken, 1);
- wake_up(&osb->flush_event);
- }
- spin_unlock(&(osb->journal->cmt_lock));
+ // kick the commit thread
+ atomic_set(&osb->flush_event_woken, 1);
+ wake_up(&osb->flush_event);
+
vote_response = FLAG_VOTE_UPDATE_RETRY;
status = 0;
break;
More information about the Ocfs2-commits
mailing list