diff options
author | Ye Bin <yebin10@huawei.com> | 2022-09-17 12:38:05 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-10-26 14:25:13 +0300 |
commit | e65506ff181fc176088f32117d69b9cb1ddda777 (patch) | |
tree | e878be8e6cb7483ac30102738a86dab875a48f1b /fs | |
parent | 1d4d16daec2a6689b6d3fbfc7d2078643adc6619 (diff) | |
download | linux-e65506ff181fc176088f32117d69b9cb1ddda777.tar.xz |
jbd2: add miss release buffer head in fc_do_one_pass()
commit dfff66f30f66b9524b661f311bbed8ff3d2ca49f 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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/jbd2/recovery.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c index 1e07dfac4d81..1ae1697fe99b 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; |