diff options
author | Tao Ma <tao.ma@oracle.com> | 2009-11-10 17:13:22 +0800 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2009-11-11 15:24:14 +0100 |
commit | 7b02bec07efe1d6c7d48c786e0c1a38d28fe7245 (patch) | |
tree | cb93e26c107052be83ba52a74652c44c3ba199da | |
parent | fe8bc91c4c30122b357d197117705cfd4fabaf28 (diff) | |
download | linux-3.10-7b02bec07efe1d6c7d48c786e0c1a38d28fe7245.tar.gz linux-3.10-7b02bec07efe1d6c7d48c786e0c1a38d28fe7245.tar.bz2 linux-3.10-7b02bec07efe1d6c7d48c786e0c1a38d28fe7245.zip |
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>
-rw-r--r-- | fs/jbd/journal.c | 2 | ||||
-rw-r--r-- | fs/jbd2/journal.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c index bd3c073b485..49d5cd6053c 100644 --- a/fs/jbd/journal.c +++ b/fs/jbd/journal.c @@ -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; } diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index b0ab5219bec..fed85388ee8 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -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; |