summaryrefslogtreecommitdiffstats
path: root/fs/jbd2
diff options
context:
space:
mode:
authorDing Dinghua <dingdinghua@nrchpc.ac.cn>2011-05-25 23:43:48 +0200
committerTheodore Ts'o <tytso@mit.edu>2011-05-25 23:43:48 +0200
commit3991b4008cb12f3abfe8dbb049b03d1cc39a8440 (patch)
tree44a6de3b438813925a2992c68aed82f0f04ef27b /fs/jbd2
parentext4: teach ext4_ext_split to calculate extents efficiently (diff)
downloadlinux-3991b4008cb12f3abfe8dbb049b03d1cc39a8440.tar.xz
linux-3991b4008cb12f3abfe8dbb049b03d1cc39a8440.zip
jbd2: fix a potential leak of a journal_head on an error path
drop jh->b_jcount in error path Signed-off-by: Ding Dinghua <dingdinghua@nrchpc.ac.cn> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/jbd2')
-rw-r--r--fs/jbd2/transaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 9dfdf010f1df..3eec82d32fd4 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -922,8 +922,8 @@ int jbd2_journal_get_create_access(handle_t *handle, struct buffer_head *bh)
*/
JBUFFER_TRACE(jh, "cancelling revoke");
jbd2_journal_cancel_revoke(handle, jh);
- jbd2_journal_put_journal_head(jh);
out:
+ jbd2_journal_put_journal_head(jh);
return err;
}