Skip to content

Commit

Permalink
jbd2: fix a potential leak of a journal_head on an error path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ding Dinghua authored and tytso committed May 25, 2011
1 parent 1b16da7 commit 3991b40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/jbd2/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 3991b40

Please sign in to comment.