Skip to content

Commit

Permalink
jbd2: simplify return path of journal_init_common
Browse files Browse the repository at this point in the history
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Theodore Ts'o committed Dec 18, 2010
1 parent 9a4f627 commit b7271b0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/jbd2/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ static journal_t * journal_init_common (void)

journal = kzalloc(sizeof(*journal), GFP_KERNEL);
if (!journal)
goto fail;
return NULL;

init_waitqueue_head(&journal->j_wait_transaction_locked);
init_waitqueue_head(&journal->j_wait_logspace);
Expand All @@ -853,14 +853,12 @@ static journal_t * journal_init_common (void)
err = jbd2_journal_init_revoke(journal, JOURNAL_REVOKE_DEFAULT_HASH);
if (err) {
kfree(journal);
goto fail;
return NULL;
}

spin_lock_init(&journal->j_history_lock);

return journal;
fail:
return NULL;
}

/* jbd2_journal_init_dev and jbd2_journal_init_inode:
Expand Down

0 comments on commit b7271b0

Please sign in to comment.