diff options
author | Theodore Ts'o <tytso@mit.edu> | 2010-12-18 13:39:38 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2010-12-18 13:39:38 -0500 |
commit | b7271b0a39947f757d7969f6150dcb16c1976b91 (patch) | |
tree | 298f473585df2253af8897cad7ff2bb6a49a6b14 /fs/jbd2 | |
parent | 9a4f6271b68b9693290963b97b320d2e6e6f3446 (diff) |
jbd2: simplify return path of journal_init_common
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/jbd2')
-rw-r--r-- | fs/jbd2/journal.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 06dfd778cae5..2447bd86f801 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c | |||
@@ -828,7 +828,7 @@ static journal_t * journal_init_common (void) | |||
828 | 828 | ||
829 | journal = kzalloc(sizeof(*journal), GFP_KERNEL); | 829 | journal = kzalloc(sizeof(*journal), GFP_KERNEL); |
830 | if (!journal) | 830 | if (!journal) |
831 | goto fail; | 831 | return NULL; |
832 | 832 | ||
833 | init_waitqueue_head(&journal->j_wait_transaction_locked); | 833 | init_waitqueue_head(&journal->j_wait_transaction_locked); |
834 | init_waitqueue_head(&journal->j_wait_logspace); | 834 | init_waitqueue_head(&journal->j_wait_logspace); |
@@ -853,14 +853,12 @@ static journal_t * journal_init_common (void) | |||
853 | err = jbd2_journal_init_revoke(journal, JOURNAL_REVOKE_DEFAULT_HASH); | 853 | err = jbd2_journal_init_revoke(journal, JOURNAL_REVOKE_DEFAULT_HASH); |
854 | if (err) { | 854 | if (err) { |
855 | kfree(journal); | 855 | kfree(journal); |
856 | goto fail; | 856 | return NULL; |
857 | } | 857 | } |
858 | 858 | ||
859 | spin_lock_init(&journal->j_history_lock); | 859 | spin_lock_init(&journal->j_history_lock); |
860 | 860 | ||
861 | return journal; | 861 | return journal; |
862 | fail: | ||
863 | return NULL; | ||
864 | } | 862 | } |
865 | 863 | ||
866 | /* jbd2_journal_init_dev and jbd2_journal_init_inode: | 864 | /* jbd2_journal_init_dev and jbd2_journal_init_inode: |