mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
JBD/JBD2: free j_wbuf if journal init fails.
If journal init fails, we need to free j_wbuf. Cc: Andrew Morton <[email protected]> Cc: Jan Kara <[email protected]> Signed-off-by: Tao Ma <[email protected]> Signed-off-by: Jan Kara <[email protected]>
This commit is contained in:
parent
fe8bc91c4c
commit
7b02bec07e
2 changed files with 4 additions and 0 deletions
|
|
@ -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