projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe8bc91
)
JBD/JBD2: free j_wbuf if journal init fails.
author
Tao Ma
<
[email protected]
>
Tue, 10 Nov 2009 09:13:22 +0000
(17:13 +0800)
committer
Jan Kara
<
[email protected]
>
Wed, 11 Nov 2009 14:24:14 +0000
(15:24 +0100)
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]
>
fs/jbd/journal.c
patch
|
blob
|
history
fs/jbd2/journal.c
patch
|
blob
|
history
diff --git
a/fs/jbd/journal.c
b/fs/jbd/journal.c
index bd3c073b485d99a5e0406016ef201aabfbee07ad..49d5cd6053c868f7011d7659dccedefbda90a3b5 100644
(file)
--- 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 b0ab5219becbd92e34c6676a93716e102e70abe9..fed85388ee86434509805091a933b34091c50596 100644
(file)
--- 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;