[Ocfs2-commits] manish commits r1165 - trunk/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Mon Jun 21 17:32:24 CDT 2004
Author: manish
Date: 2004-06-21 16:32:22 -0500 (Mon, 21 Jun 2004)
New Revision: 1165
Modified:
trunk/src/journal.c
Log:
fixup journal-related ifdef mess. Patch from Christoph Hellwig.
Modified: trunk/src/journal.c
===================================================================
--- trunk/src/journal.c 2004-06-21 21:29:43 UTC (rev 1164)
+++ trunk/src/journal.c 2004-06-21 21:32:22 UTC (rev 1165)
@@ -105,9 +105,17 @@
return status;
}
-#else
-#define ocfs_journal_start journal_start
-#define ocfs_journal_stop journal_stop
+
+#define journal_start(journal, nblocks) \
+ ocfs_journal_start(journal, nblocks)
+#define journal_stop(handle) \
+ ocfs_journal_stop(handle)
+
+/* these two gained another argument during 2.6 */
+#define journal_get_write_access(handle, bh, credits) \
+ journal_get_write_access(handle, bh)
+#define journal_get_undo_access(handle, bh, credits) \
+ journal_get_undo_access(handle, bh)
#endif
@@ -165,7 +173,7 @@
down_read(&osb->journal->trans_barrier);
/* actually start the transaction now */
- retval->k_handle = ocfs_journal_start(journal, max_buffs);
+ retval->k_handle = journal_start(journal, max_buffs);
if (IS_ERR(retval->k_handle)) {
up_read(&osb->journal->trans_barrier);
@@ -411,7 +419,7 @@
/* actually stop the transaction. if we've set h_sync,
* it'll have been commited when we return */
- retval = ocfs_journal_stop(kern_handle);
+ retval = journal_stop(kern_handle);
if (retval < 0) {
LOG_ERROR_STATUS(retval);
LOG_ERROR_STR("Could not commit transaction");
@@ -583,7 +591,7 @@
/* want to force our handle to disk in abort case. */
handle->k_handle->h_sync = 1;
- retval = ocfs_journal_stop(handle->k_handle);
+ retval = journal_stop(handle->k_handle);
if (retval < 0) {
LOG_ERROR_STR("Could not commit aborted transaction!");
LOG_ERROR_STATUS(retval);
@@ -705,19 +713,11 @@
switch (type) {
case OCFS_JOURNAL_ACCESS_CREATE:
case OCFS_JOURNAL_ACCESS_WRITE:
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
status = journal_get_write_access(handle->k_handle, bh, NULL);
-#else
- status = journal_get_write_access(handle->k_handle, bh);
-#endif
break;
case OCFS_JOURNAL_ACCESS_UNDO:
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
status = journal_get_undo_access(handle->k_handle, bh, NULL);
-#else
- status = journal_get_undo_access(handle->k_handle, bh);
-#endif
break;
default:
More information about the Ocfs2-commits
mailing list