提交 ad16dfef 编写于 作者: C Coly Li 提交者: Greg Kroah-Hartman

bcache: remove redundant LIST_HEAD(journal) from run_cache_set()

[ Upstream commit cdca22bcbc64fc83dadb8d927df400a8d86ddabb ]

Commit 95f18c9d1310 ("bcache: avoid potential memleak of list of
journal_replay(s) in the CACHE_SYNC branch of run_cache_set") forgets
to remove the original define of LIST_HEAD(journal), which makes
the change no take effect. This patch removes redundant variable
LIST_HEAD(journal) from run_cache_set(), to make Shenghui's fix
working.

Fixes: 95f18c9d1310 ("bcache: avoid potential memleak of list of journal_replay(s) in the CACHE_SYNC branch of run_cache_set")
Reported-by: NJuha Aatrokoski <juha.aatrokoski@aalto.fi>
Cc: Shenghui Wang <shhuiw@foxmail.com>
Signed-off-by: NColy Li <colyli@suse.de>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
Signed-off-by: NSasha Levin <sashal@kernel.org>
上级 08fdaee2
...@@ -1768,7 +1768,6 @@ static int run_cache_set(struct cache_set *c) ...@@ -1768,7 +1768,6 @@ static int run_cache_set(struct cache_set *c)
set_gc_sectors(c); set_gc_sectors(c);
if (CACHE_SYNC(&c->sb)) { if (CACHE_SYNC(&c->sb)) {
LIST_HEAD(journal);
struct bkey *k; struct bkey *k;
struct jset *j; struct jset *j;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册