2011-05-26 02:28:32

by Ding Dinghua

[permalink] [raw]
Subject: [PATCH 1/2] jbd2: fix a bug of leaking jh->b_jcount

jbd2_journal_get_create_access should drop jh->b_jcount in error
handling path

Signed-off-by: Ding Dinghua <[email protected]>
---
fs/jbd2/transaction.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

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;
}

--
1.7.4.1



2011-05-26 15:16:16

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH 1/2] jbd2: fix a bug of leaking jh->b_jcount

On Thu, May 26, 2011 at 10:28:22AM +0800, Ding Dinghua wrote:
> jbd2_journal_get_create_access should drop jh->b_jcount in error
> handling path
>
> Signed-off-by: Ding Dinghua <[email protected]>

Thanks, merged into the ext4 tree.

- Ted