Commit 3991b400 authored by Ding Dinghua's avatar Ding Dinghua Committed by Theodore Ts'o

jbd2: fix a potential leak of a journal_head on an error path

drop jh->b_jcount in error path
Signed-off-by: default avatarDing Dinghua <dingdinghua@nrchpc.ac.cn>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 1b16da77
...@@ -922,8 +922,8 @@ int jbd2_journal_get_create_access(handle_t *handle, struct buffer_head *bh) ...@@ -922,8 +922,8 @@ int jbd2_journal_get_create_access(handle_t *handle, struct buffer_head *bh)
*/ */
JBUFFER_TRACE(jh, "cancelling revoke"); JBUFFER_TRACE(jh, "cancelling revoke");
jbd2_journal_cancel_revoke(handle, jh); jbd2_journal_cancel_revoke(handle, jh);
jbd2_journal_put_journal_head(jh);
out: out:
jbd2_journal_put_journal_head(jh);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment