Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125835
b: refs/heads/master
c: 90e86a6
h: refs/heads/master
i:
  125833: 65137ed
  125831: d5a2116
v: v3
  • Loading branch information
Jan Kara authored and Mark Fasheh committed Jan 5, 2009
1 parent 3d52f6a commit c9b9263
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 12c77527e4138bc3b17d17b0e0c909e4fc84924f
refs/heads/master: 90e86a63eadf1a3b2f19b68d82150dc63fe01443
14 changes: 7 additions & 7 deletions trunk/fs/ocfs2/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,9 @@ handle_t *ocfs2_start_trans(struct ocfs2_super *osb, int max_buffs)
BUG_ON(osb->journal->j_state == OCFS2_JOURNAL_FREE);
BUG_ON(max_buffs <= 0);

/* JBD might support this, but our journalling code doesn't yet. */
if (journal_current_handle()) {
mlog(ML_ERROR, "Recursive transaction attempted!\n");
BUG();
}
/* Nested transaction? Just return the handle... */
if (journal_current_handle())
return jbd2_journal_start(journal, max_buffs);

down_read(&osb->journal->j_trans_barrier);

Expand All @@ -285,16 +283,18 @@ handle_t *ocfs2_start_trans(struct ocfs2_super *osb, int max_buffs)
int ocfs2_commit_trans(struct ocfs2_super *osb,
handle_t *handle)
{
int ret;
int ret, nested;
struct ocfs2_journal *journal = osb->journal;

BUG_ON(!handle);

nested = handle->h_ref > 1;
ret = jbd2_journal_stop(handle);
if (ret < 0)
mlog_errno(ret);

up_read(&journal->j_trans_barrier);
if (!nested)
up_read(&journal->j_trans_barrier);

return ret;
}
Expand Down

0 comments on commit c9b9263

Please sign in to comment.