projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3df11e2
)
jbd2: add miss release buffer head in fc_do_one_pass()
author
Ye Bin
<yebin10@huawei.com>
Sat, 17 Sep 2022 09:38:05 +0000
(17:38 +0800)
committer
Theodore Ts'o
<tytso@mit.edu>
Sat, 1 Oct 2022 03:46:54 +0000
(23:46 -0400)
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>
fs/jbd2/recovery.c
patch
|
blob
|
history
diff --git
a/fs/jbd2/recovery.c
b/fs/jbd2/recovery.c
index f548479615c69ccfe2dbd2733bc3d6feafd39290..3688d16fe83b0f00cf93efb8a930ff6f1958d729 100644
(file)
--- 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;