提交 7b02bec0 编写于 作者: T Tao Ma 提交者: Jan Kara

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: NTao Ma <tao.ma@oracle.com>
Signed-off-by: NJan Kara <jack@suse.cz>
上级 fe8bc91c
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册