Commit b7271b0a authored by Theodore Ts'o's avatar Theodore Ts'o

jbd2: simplify return path of journal_init_common

Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 9a4f6271
...@@ -828,7 +828,7 @@ static journal_t * journal_init_common (void) ...@@ -828,7 +828,7 @@ static journal_t * journal_init_common (void)
journal = kzalloc(sizeof(*journal), GFP_KERNEL); journal = kzalloc(sizeof(*journal), GFP_KERNEL);
if (!journal) if (!journal)
goto fail; return NULL;
init_waitqueue_head(&journal->j_wait_transaction_locked); init_waitqueue_head(&journal->j_wait_transaction_locked);
init_waitqueue_head(&journal->j_wait_logspace); init_waitqueue_head(&journal->j_wait_logspace);
...@@ -853,14 +853,12 @@ static journal_t * journal_init_common (void) ...@@ -853,14 +853,12 @@ static journal_t * journal_init_common (void)
err = jbd2_journal_init_revoke(journal, JOURNAL_REVOKE_DEFAULT_HASH); err = jbd2_journal_init_revoke(journal, JOURNAL_REVOKE_DEFAULT_HASH);
if (err) { if (err) {
kfree(journal); kfree(journal);
goto fail; return NULL;
} }
spin_lock_init(&journal->j_history_lock); spin_lock_init(&journal->j_history_lock);
return journal; return journal;
fail:
return NULL;
} }
/* jbd2_journal_init_dev and jbd2_journal_init_inode: /* jbd2_journal_init_dev and jbd2_journal_init_inode:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment