diff options
author | Mark Fasheh <mark.fasheh@oracle.com> | 2006-10-05 18:11:36 -0400 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2006-12-01 21:27:06 -0500 |
commit | c161f89be7d57af863e434e9b15afaa863343a7a (patch) | |
tree | 18152d2fb567746e74a0f57f0d11c53c740db87a /fs/ocfs2/journal.c | |
parent | 1fc581467e52546195c7ee8233a34d63c1cc1322 (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.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index 7c0c57ad517b..ca6f2094b006 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, | |||
190 | } | 190 | } |
191 | 191 | ||
192 | atomic_inc(&(osb->journal->j_num_trans)); | 192 | atomic_inc(&(osb->journal->j_num_trans)); |
193 | handle->flags |= OCFS2_HANDLE_STARTED; | ||
194 | 193 | ||
195 | mlog_exit_ptr(handle); | 194 | mlog_exit_ptr(handle); |
196 | return handle; | 195 | return handle; |
@@ -247,8 +246,6 @@ static void ocfs2_commit_unstarted_handle(struct ocfs2_journal_handle *handle) | |||
247 | { | 246 | { |
248 | mlog_entry_void(); | 247 | mlog_entry_void(); |
249 | 248 | ||
250 | BUG_ON(handle->flags & OCFS2_HANDLE_STARTED); | ||
251 | |||
252 | ocfs2_handle_unlock_inodes(handle); | 249 | ocfs2_handle_unlock_inodes(handle); |
253 | /* You are allowed to add journal locks before the transaction | 250 | /* You are allowed to add journal locks before the transaction |
254 | * has started. */ | 251 | * has started. */ |
@@ -269,7 +266,7 @@ void ocfs2_commit_trans(struct ocfs2_journal_handle *handle) | |||
269 | 266 | ||
270 | BUG_ON(!handle); | 267 | BUG_ON(!handle); |
271 | 268 | ||
272 | if (!(handle->flags & OCFS2_HANDLE_STARTED)) { | 269 | if (!handle->k_handle) { |
273 | ocfs2_commit_unstarted_handle(handle); | 270 | ocfs2_commit_unstarted_handle(handle); |
274 | mlog_exit_void(); | 271 | mlog_exit_void(); |
275 | return; | 272 | return; |
@@ -285,11 +282,6 @@ void ocfs2_commit_trans(struct ocfs2_journal_handle *handle) | |||
285 | if (handle->k_handle) { | 282 | if (handle->k_handle) { |
286 | jbd_handle = handle->k_handle; | 283 | jbd_handle = handle->k_handle; |
287 | 284 | ||
288 | if (handle->flags & OCFS2_HANDLE_SYNC) | ||
289 | jbd_handle->h_sync = 1; | ||
290 | else | ||
291 | jbd_handle->h_sync = 0; | ||
292 | |||
293 | /* actually stop the transaction. if we've set h_sync, | 285 | /* actually stop the transaction. if we've set h_sync, |
294 | * it'll have been committed when we return */ | 286 | * it'll have been committed when we return */ |
295 | retval = journal_stop(jbd_handle); | 287 | retval = journal_stop(jbd_handle); |
@@ -366,7 +358,6 @@ int ocfs2_journal_access(struct ocfs2_journal_handle *handle, | |||
366 | BUG_ON(!inode); | 358 | BUG_ON(!inode); |
367 | BUG_ON(!handle); | 359 | BUG_ON(!handle); |
368 | BUG_ON(!bh); | 360 | BUG_ON(!bh); |
369 | BUG_ON(!(handle->flags & OCFS2_HANDLE_STARTED)); | ||
370 | 361 | ||
371 | mlog_entry("bh->b_blocknr=%llu, type=%d (\"%s\"), bh->b_size = %zu\n", | 362 | mlog_entry("bh->b_blocknr=%llu, type=%d (\"%s\"), bh->b_size = %zu\n", |
372 | (unsigned long long)bh->b_blocknr, type, | 363 | (unsigned long long)bh->b_blocknr, type, |
@@ -421,8 +412,6 @@ int ocfs2_journal_dirty(struct ocfs2_journal_handle *handle, | |||
421 | { | 412 | { |
422 | int status; | 413 | int status; |
423 | 414 | ||
424 | BUG_ON(!(handle->flags & OCFS2_HANDLE_STARTED)); | ||
425 | |||
426 | mlog_entry("(bh->b_blocknr=%llu)\n", | 415 | mlog_entry("(bh->b_blocknr=%llu)\n", |
427 | (unsigned long long)bh->b_blocknr); | 416 | (unsigned long long)bh->b_blocknr); |
428 | 417 | ||