Skip to content

Commit

Permalink
jbd2: add miss release buffer head in fc_do_one_pass()
Browse files Browse the repository at this point in the history
commit dfff66f upstream.

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

Cc: [email protected]
Signed-off-by: Ye Bin <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Ye Bin authored and gregkh committed Oct 26, 2022
1 parent d11d2de commit 56fcd07
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/jbd2/recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ static int fc_do_one_pass(journal_t *journal,
err = journal->j_fc_replay_callback(journal, bh, pass,
next_fc_block - journal->j_fc_first,
expected_commit_id);
brelse(bh);
next_fc_block++;
if (err < 0 || err == JBD2_FC_REPLAY_STOP)
break;
Expand Down

0 comments on commit 56fcd07

Please sign in to comment.