Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp706043imm; Wed, 15 Aug 2018 04:52:58 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxW3O7wyUNuAsCI9WDFyGqQ+pL0k3cqOPRjyzoIi5yDbqpg48U41Y/v7oXX/0hMDdDlOL8r X-Received: by 2002:a17:902:7287:: with SMTP id d7-v6mr23927399pll.54.1534333978692; Wed, 15 Aug 2018 04:52:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534333978; cv=none; d=google.com; s=arc-20160816; b=xLw0QcmI2twf7ph9e3znaflg02O8psBLeSNRm5LRgwAvumbNfGBoiVFpSPnwOYlV6t VTYZZ0vT254iEp1E6knK23gtFZubWWiGE8rGrWOwb5PRjGmhh2CBGgvAIFn5sMJiLsUo Z8R6BZxLVJ2Gg6GBvrfLEaX7exHmOoJrxyX9uh9Ec/ZxgDDl9hNQ1Ouxy1bMpArxgY5c DwdsWF2KWMpUXg9hkDJJoCOySmFLKfr46dP79jchHdTaMkvXVkD69QS+5VcTlR++gsnE Uxn6Yxmx0znOj9G9u9yyHr6aa3nQwY3159eCFtSLXTfl5B8+9guttwBb5bax7E0CYP87 64oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=SuS+4btR2CkCVVCG5nWP9LC3wiivwbrEPvoidRfBfag=; b=RNbvkyCRS42A5EqrW4AohEx6rgHwWvjRV6t7N/+yBlnmxTPyQ97m9zhVCONC6YFRIs pnHsaEAlZm14Lv2X2XA4EQ/bpsFPw8As+w+VwpERjyMpnlJwUxJckH7c8Ed8yuF8qXtD buXJXLFXNnDCWzIz/FfaxD9KNmcoJbHiJ/A+CRhrRtvlod/bagF1oQZu6o+e9inriQux dNm8lWYtda68RFl0yx+wJ4PkVl8FKWSL3tUtEoEPEmva3DMiqttoNQjUmAzdXN0uHUpA IZqS5QE6dHKiHQmbPmC4BcYOw0r1NA9d6vXPrUoJEug4y+6bQom97qlnSH9c4tn8EUMx kTXQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m21-v6si24199511pgh.664.2018.08.15.04.52.41; Wed, 15 Aug 2018 04:52:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729154AbeHOOnj (ORCPT + 99 others); Wed, 15 Aug 2018 10:43:39 -0400 Received: from mx2.suse.de ([195.135.220.15]:36666 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727141AbeHOOnj (ORCPT ); Wed, 15 Aug 2018 10:43:39 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 5D0E5ACCE; Wed, 15 Aug 2018 11:51:46 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 1A82ADAC96; Wed, 15 Aug 2018 13:51:38 +0200 (CEST) Date: Wed, 15 Aug 2018 13:51:38 +0200 From: David Sterba To: zhong jiang Cc: clm@fb.com, jbacik@fb.com, dsterba@suse.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] btrfs:free-space-cache: remove unneeded NULL check before kfree Message-ID: <20180815115137.GJ24025@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, zhong jiang , clm@fb.com, jbacik@fb.com, dsterba@suse.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org References: <1534140369-11578-1-git-send-email-zhongjiang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1534140369-11578-1-git-send-email-zhongjiang@huawei.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 13, 2018 at 02:06:08PM +0800, zhong jiang wrote: > Kfree has taken the null pointer into account. So remove the check > before kfree. > > The issue is detected with the help of Coccinelle. > > Signed-off-by: zhong jiang Added to misc-next, thanks.