提交 dfff66f3 编写于 作者: Y Ye Bin 提交者: Theodore Ts'o

jbd2: add miss release buffer head in fc_do_one_pass()

In fc_do_one_pass() miss release buffer head after use which will lead
to reference count leak.

Cc: stable@kernel.org
Signed-off-by: NYe Bin <yebin10@huawei.com>
Reviewed-by: NJan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20220917093805.1782845-1-yebin10@huawei.comSigned-off-by: NTheodore Ts'o <tytso@mit.edu>
上级 3df11e27
...@@ -256,6 +256,7 @@ static int fc_do_one_pass(journal_t *journal, ...@@ -256,6 +256,7 @@ static int fc_do_one_pass(journal_t *journal,
err = journal->j_fc_replay_callback(journal, bh, pass, err = journal->j_fc_replay_callback(journal, bh, pass,
next_fc_block - journal->j_fc_first, next_fc_block - journal->j_fc_first,
expected_commit_id); expected_commit_id);
brelse(bh);
next_fc_block++; next_fc_block++;
if (err < 0 || err == JBD2_FC_REPLAY_STOP) if (err < 0 || err == JBD2_FC_REPLAY_STOP)
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册