Skip to content

Commit 56fcd07

Browse files
Ye Bingregkh
authored andcommitted
jbd2: add miss release buffer head in fc_do_one_pass()
commit dfff66f upstream. 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: Ye Bin <yebin10@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20220917093805.1782845-1-yebin10@huawei.com Signed-off-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent d11d2de commit 56fcd07

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/jbd2/recovery.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ static int fc_do_one_pass(journal_t *journal,
256256
err = journal->j_fc_replay_callback(journal, bh, pass,
257257
next_fc_block - journal->j_fc_first,
258258
expected_commit_id);
259+
brelse(bh);
259260
next_fc_block++;
260261
if (err < 0 || err == JBD2_FC_REPLAY_STOP)
261262
break;

0 commit comments

Comments
 (0)