From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99A9AC352A9 for ; Sun, 29 Sep 2019 13:58:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 71B7921835 for ; Sun, 29 Sep 2019 13:58:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569765535; bh=+KG8sRgP3Wm81Em5/w/DimPHknppyCnQMQyI2CmVChw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=CP3/BQKUwf3Sd8ASr5JhHSt8YpLGY8rPqOWDxc/oDkyb1xeKMqdytUOpbZZQDYTw3 5bfNN2v9ShE11D36PAvgC5kaNXVYOC1bx352v/urIu78i6uKeyvaz5dM9ooYj13W/t TDsXR12M/YGZmjg+u8oo+X5UVEZoFfCVkSgNRRVk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729584AbfI2N6r (ORCPT ); Sun, 29 Sep 2019 09:58:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:39650 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729530AbfI2N6r (ORCPT ); Sun, 29 Sep 2019 09:58:47 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0AE5521906; Sun, 29 Sep 2019 13:58:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569765526; bh=+KG8sRgP3Wm81Em5/w/DimPHknppyCnQMQyI2CmVChw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fizPgT0TZk2drue2pnIsnyKV1ZtLIeVe+kUAu7Qlkjz7WwFqBUxiIZDghnyoj2CAF 0bnTXFZW72owr7NR34pyhGf1Mig+wzBzcqaV0wHNfs9WtfBc5PxatlA5N7qxyf8+Ey 95r6mx221w4lSRiuq/Scrv+qWI5Pp5xo5zNKSd0U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Juha Aatrokoski , Shenghui Wang , Coly Li , Jens Axboe , Sasha Levin Subject: [PATCH 4.19 46/63] bcache: remove redundant LIST_HEAD(journal) from run_cache_set() Date: Sun, 29 Sep 2019 15:54:19 +0200 Message-Id: <20190929135039.656505067@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190929135031.382429403@linuxfoundation.org> References: <20190929135031.382429403@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Coly Li [ 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 Cc: Shenghui Wang Signed-off-by: Coly Li Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- drivers/md/bcache/super.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index e6c7a84bb1dfd..2321643974dab 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -1768,7 +1768,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; -- 2.20.1