jbd2: simplify return path of journal_init_common
authorTheodore Ts'o <tytso@mit.edu>
Sat, 18 Dec 2010 18:39:38 +0000 (13:39 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 18 Dec 2010 18:39:38 +0000 (13:39 -0500)
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/jbd2/journal.c

index 06dfd778cae5efbe493e1c10ad5d1f1f5ffd9d3a..2447bd86f8015c51455b92d274521d1534976471 100644 (file)
@@ -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);
@@ -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: