From: Ding Dinghua Date: Wed, 25 May 2011 21:43:48 +0000 (-0400) Subject: jbd2: fix a potential leak of a journal_head on an error path X-Git-Tag: MMI-PSA29.97-13-9~19454^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3991b4008cb12f3abfe8dbb049b03d1cc39a8440;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: "Theodore Ts'o" --- 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; }