[Ocfs2-commits] jlbec commits r1034 - trunk/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed Jun 9 05:58:02 CDT 2004


Author: jlbec
Date: 2004-06-09 04:58:00 -0500 (Wed, 09 Jun 2004)
New Revision: 1034

Modified:
   trunk/src/journal.c
Log:

o Merged revision 1033 from format-changes branch
	- [1033] Clean up ocfs_journal_{start,stop} compat



Modified: trunk/src/journal.c
===================================================================
--- trunk/src/journal.c	2004-06-09 09:54:32 UTC (rev 1033)
+++ trunk/src/journal.c	2004-06-09 09:58:00 UTC (rev 1034)
@@ -57,35 +57,38 @@
  * with any other lock.
  * 
  * 2.6 does it the right way by spinlocking around it's structures.
- * 
- * These two should be moved to compat.h when it exists. 
+ *
+ * These aren't in ocfs_compat.h because they require wayyyy to much
+ * #included.
  */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
 static inline handle_t *ocfs_journal_start(journal_t *journal, int nblocks)
 {
-	handle_t * h;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+	handle_t *h;
+
 	lock_kernel();
-#endif
 	h = journal_start(journal, nblocks);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
 	unlock_kernel();
-#endif
-	return(h);
+
+	return h;
 }
 
 static inline int ocfs_journal_stop(handle_t *handle)
 {
 	int status;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+
 	lock_kernel();
-#endif
 	status = journal_stop(handle);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
 	unlock_kernel();
+
+	return status;
+}
+#else
+#define ocfs_journal_start	journal_start
+#define ocfs_journal_stop	journal_stop
 #endif
-	return(status);
-}
 
+
 /* DO NOT EVER CALL THIS FUNCTION WITH A LOCKED BUFFER HEAD! */
 ocfs_journal_handle * ocfs_start_trans(ocfs_super *osb, int max_buffs) 
 {



More information about the Ocfs2-commits mailing list