aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe Bin <[email protected]>2022-09-17 17:38:05 +0800
committerTheodore Ts'o <[email protected]>2022-09-30 23:46:54 -0400
commitdfff66f30f66b9524b661f311bbed8ff3d2ca49f (patch)
tree147ae7b81cd43f7b79e9476337e488620a7ae73e
parent3df11e27f02c3dea5a3a0e45628d67f0d82c3c5e (diff)
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: [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]>
-rw-r--r--fs/jbd2/recovery.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c
index f548479615c6..3688d16fe83b 100644
--- a/fs/jbd2/recovery.c
+++ b/fs/jbd2/recovery.c
@@ -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;