[Ocfs2-commits] mfasheh commits r1318 - trunk/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Mon Aug 2 15:20:14 CDT 2004


Author: mfasheh
Date: 2004-08-02 14:20:12 -0500 (Mon, 02 Aug 2004)
New Revision: 1318

Modified:
   trunk/src/dlm.c
   trunk/src/nm.c
   trunk/src/nm.h
Log:
* commit a patch by <hch at lst.de> to cleanup ocfs_inc_inode_seq a bit.



Modified: trunk/src/dlm.c
===================================================================
--- trunk/src/dlm.c	2004-08-02 19:17:14 UTC (rev 1317)
+++ trunk/src/dlm.c	2004-08-02 19:20:12 UTC (rev 1318)
@@ -1327,7 +1327,7 @@
 		ocfs_node_map_set(&lockres->oin_openmap, &open_map);
 
 	if (need_to_zap_buffers)
-		ocfs_inc_inode_seq(osb, inode, 0);
+		ocfs_inc_inode_seq(osb, inode);
 	
 	/* just alerting owner on open */
 	if (flags & (FLAG_ADD_OIN_MAP | FLAG_TRUNCATE_PAGES))

Modified: trunk/src/nm.c
===================================================================
--- trunk/src/nm.c	2004-08-02 19:17:14 UTC (rev 1317)
+++ trunk/src/nm.c	2004-08-02 19:20:12 UTC (rev 1318)
@@ -1145,7 +1145,7 @@
 			}
 
 			if (is_dir && vote_type == RELEASE_CACHE)
-				ocfs_inc_inode_seq(osb, inode, 0);
+				ocfs_inc_inode_seq(osb, inode);
 
 			/* need to do the write only if fe lock values need to change */
 			if (is_locked || vote_type == CHANGE_MASTER) {
@@ -1372,8 +1372,10 @@
 		}
 	}
 
-	if (inc_inode_seq)
-		ocfs_inc_inode_seq(osb, inode, 1);
+	if (inc_inode_seq) {
+		ocfs_inc_inode_seq(osb, inode);
+		sync_mapping_buffers(inode->i_mapping);
+	}
 	iput(inode);
 
 no_inode_leave:
@@ -1387,7 +1389,7 @@
 
 
 /* inode is definitely non NULL */
-void ocfs_inc_inode_seq(ocfs_super *osb, struct inode *inode, int sync_buffers)
+void ocfs_inc_inode_seq(ocfs_super *osb, struct inode *inode)
 {
 	atomic_t *seq = GET_INODE_CLEAN_SEQ(inode);
 
@@ -1408,9 +1410,6 @@
 	
 	LOG_TRACE_ARGS("done incrementing inode seq... new is %d\n", 
 		       atomic_read(seq));
-
-	if (sync_buffers) 
-		sync_mapping_buffers(inode->i_mapping);
 }
 
 

Modified: trunk/src/nm.h
===================================================================
--- trunk/src/nm.h	2004-08-02 19:17:14 UTC (rev 1317)
+++ trunk/src/nm.h	2004-08-02 19:20:12 UTC (rev 1318)
@@ -31,8 +31,7 @@
 
 int ocfs_drop_readonly_cache_lock(ocfs_super *osb, struct inode *inode,
 				  int yield);
-void ocfs_inc_inode_seq(ocfs_super *osb, struct inode *inode,
-			int sync_buffers);
+void ocfs_inc_inode_seq(ocfs_super *osb, struct inode *inode);
 int ocfs_process_vote(ocfs_super *osb, ocfs_vote_request_ctxt *ctxt);
 int ocfs_recv_thread(void *unused);
 void ocfs_recover_oin_locks(ocfs_super *osb, __u32 node_num);



More information about the Ocfs2-commits mailing list