mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
JBD/JBD2: free j_wbuf if journal init fails.
If journal init fails, we need to free j_wbuf. Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jan Kara <jack@suse.cz> Signed-off-by: Tao Ma <tao.ma@oracle.com> Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
parent
fe8bc91c4c
commit
7b02bec07e
2 changed files with 4 additions and 0 deletions
|
@ -756,6 +756,7 @@ journal_t * journal_init_dev(struct block_device *bdev,
|
|||
|
||||
return journal;
|
||||
out_err:
|
||||
kfree(journal->j_wbuf);
|
||||
kfree(journal);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -820,6 +821,7 @@ journal_t * journal_init_inode (struct inode *inode)
|
|||
|
||||
return journal;
|
||||
out_err:
|
||||
kfree(journal->j_wbuf);
|
||||
kfree(journal);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -913,6 +913,7 @@ journal_t * jbd2_journal_init_dev(struct block_device *bdev,
|
|||
|
||||
return journal;
|
||||
out_err:
|
||||
kfree(journal->j_wbuf);
|
||||
jbd2_stats_proc_exit(journal);
|
||||
kfree(journal);
|
||||
return NULL;
|
||||
|
@ -986,6 +987,7 @@ journal_t * jbd2_journal_init_inode (struct inode *inode)
|
|||
|
||||
return journal;
|
||||
out_err:
|
||||
kfree(journal->j_wbuf);
|
||||
jbd2_stats_proc_exit(journal);
|
||||
kfree(journal);
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in a new issue