aboutsummaryrefslogtreecommitdiff
path: root/fs/ocfs2/journal.c
diff options
context:
space:
mode:
authorMark Fasheh <mark.fasheh@oracle.com>2006-10-05 15:11:36 -0700
committerMark Fasheh <mark.fasheh@oracle.com>2006-12-01 18:27:06 -0800
commitc161f89be7d57af863e434e9b15afaa863343a7a (patch)
tree18152d2fb567746e74a0f57f0d11c53c740db87a /fs/ocfs2/journal.c
parent1fc581467e52546195c7ee8233a34d63c1cc1322 (diff)
ocfs2: remove ocfs2_journal_handle flags field
Callers can set h_sync directly on the handle_t, whether a transaction has been started or not can be determined via the existence of the handle_t on the struct ocfs2_journal_handle. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/journal.c')
-rw-r--r--fs/ocfs2/journal.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
index 7c0c57ad517..ca6f2094b00 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -190,7 +190,6 @@ struct ocfs2_journal_handle *ocfs2_start_trans(struct ocfs2_super *osb,
}
atomic_inc(&(osb->journal->j_num_trans));
- handle->flags |= OCFS2_HANDLE_STARTED;
mlog_exit_ptr(handle);
return handle;
@@ -247,8 +246,6 @@ static void ocfs2_commit_unstarted_handle(struct ocfs2_journal_handle *handle)
{
mlog_entry_void();
- BUG_ON(handle->flags & OCFS2_HANDLE_STARTED);
-
ocfs2_handle_unlock_inodes(handle);
/* You are allowed to add journal locks before the transaction
* has started. */
@@ -269,7 +266,7 @@ void ocfs2_commit_trans(struct ocfs2_journal_handle *handle)
BUG_ON(!handle);
- if (!(handle->flags & OCFS2_HANDLE_STARTED)) {
+ if (!handle->k_handle) {
ocfs2_commit_unstarted_handle(handle);
mlog_exit_void();
return;
@@ -285,11 +282,6 @@ void ocfs2_commit_trans(struct ocfs2_journal_handle *handle)
if (handle->k_handle) {
jbd_handle = handle->k_handle;
- if (handle->flags & OCFS2_HANDLE_SYNC)
- jbd_handle->h_sync = 1;
- else
- jbd_handle->h_sync = 0;
-
/* actually stop the transaction. if we've set h_sync,
* it'll have been committed when we return */
retval = journal_stop(jbd_handle);
@@ -366,7 +358,6 @@ int ocfs2_journal_access(struct ocfs2_journal_handle *handle,
BUG_ON(!inode);
BUG_ON(!handle);
BUG_ON(!bh);
- BUG_ON(!(handle->flags & OCFS2_HANDLE_STARTED));
mlog_entry("bh->b_blocknr=%llu, type=%d (\"%s\"), bh->b_size = %zu\n",
(unsigned long long)bh->b_blocknr, type,
@@ -421,8 +412,6 @@ int ocfs2_journal_dirty(struct ocfs2_journal_handle *handle,
{
int status;
- BUG_ON(!(handle->flags & OCFS2_HANDLE_STARTED));
-
mlog_entry("(bh->b_blocknr=%llu)\n",
(unsigned long long)bh->b_blocknr);