Patchwork [1/2] Jbd2: fix a bug of leaking jh->b_jcount

login
register
mail settings
Submitter y@mx.nrchpc.ac.cn
Date May 25, 2011, 10:19 a.m.
Message ID <1306318786-8324-1-git-send-email-y>
Download mbox | patch
Permalink /patch/97321/
State Superseded
Headers show

Comments

y@mx.nrchpc.ac.cn - May 25, 2011, 10:19 a.m.
From: Ding Dinghua <dingdinghua@nrchpc.ac.cn>

drop jh->b_jcount in error path
---
 fs/jbd2/transaction.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 05fa77a..d66672a 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -921,8 +921,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;
 }