]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
bcache: remove redundant LIST_HEAD(journal) from run_cache_set()
authorColy Li <colyli@suse.de>
Tue, 30 Apr 2019 14:02:25 +0000 (22:02 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 16 Oct 2019 09:55:36 +0000 (11:55 +0200)
BugLink: https://bugs.launchpad.net/bugs/1847155
[ 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: Juha Aatrokoski <juha.aatrokoski@aalto.fi>
Cc: Shenghui Wang <shhuiw@foxmail.com>
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/md/bcache/super.c

index ef96a704754a980221bbfbc426f29c0490c4428f..c1490a993f931084c28bc096906b8895652d1ae6 100644 (file)
@@ -1765,7 +1765,6 @@ static int run_cache_set(struct cache_set *c)
        set_gc_sectors(c);
 
        if (CACHE_SYNC(&c->sb)) {
-               LIST_HEAD(journal);
                struct bkey *k;
                struct jset *j;