Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp636683imm; Sat, 8 Sep 2018 06:09:11 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZXfoYuMO0SMwXR2MM73Mjdl32eumkDz7Fhu1t/489iTu5ZV9YVkqxkPY+0kzZ6sL5/MBmZ X-Received: by 2002:a17:902:5501:: with SMTP id f1-v6mr12668290pli.219.1536412150960; Sat, 08 Sep 2018 06:09:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536412150; cv=none; d=google.com; s=arc-20160816; b=yTqXH3np3p1ZtqXUYEGp5wZbW1JfTez7nZigtT9AiNgX+y9uZ6eMlrd/xhS5WJrmV8 VdI3k7bV3AyWuyn74RCkcGu072C/VwApIivUt1tAUmn7fW44Cnjo2j8DMFyAJo9MDVgv udgareOoMvpH20aJ4KwVSXh7ZjX5ITelp5WdPm0WiKPiV/ynPu3SxTTtEl4srOkfRX6B h/eoC+sW4CyPt+D0VG+f2YAASNPl9lmAD9o9d/WESEVJkaK2VgIjgnLhtkfWbsSp6tqJ 23cZ/a4DMZIglPHRqCwDcv0+thJ0LHMRnQjVUA9NmUInUUAMP3cUgrQG+B8NfEUNCMvQ d5gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=oi5YSXRMDg8qo5UO2r7QjZXTOAfafFaQ9ym2yIkdhFY=; b=yW1VXQvGtk2NIBH42pQGOBpxqLvd6eI62s2PD80kju8D4b3enm1gFwFIDtH5KAZnlX 6lbxH0Na4q3JEIzTMzQ1Nb2Dr9NTIqCbF30hSOoHsZvbVcUWFYypVNwmRlImitsI/n70 dkURamoMADMVvEgGsduzQAQxdMIlXG+b0/e0mxgzpndmXWARBP3wdUs2wQ882UcW3Y1F mFHErK9yL8Lkw04K40WScoOMBozRDWTnR3zKklspBWaw9veVqLkle9RSIAmuIGodGoSk /KFdwjp/VM0QlkpKfPI/8F/WQLkTpY9dDEduQEQXfev1SGCo4SfGOwGB5uGgy5K6qhWy jZqQ== 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 e4-v6si10309079pfn.340.2018.09.08.06.08.53; Sat, 08 Sep 2018 06:09:10 -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 S1726663AbeIHRx2 (ORCPT + 99 others); Sat, 8 Sep 2018 13:53:28 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:35426 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726351AbeIHRx1 (ORCPT ); Sat, 8 Sep 2018 13:53:27 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 63CDFEDF68AD3; Sat, 8 Sep 2018 21:07:40 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.399.0; Sat, 8 Sep 2018 21:07:38 +0800 From: zhong jiang To: , CC: , Subject: [PATCH] bcache: remove redundant condition before debugfs_remove Date: Sat, 8 Sep 2018 20:55:27 +0800 Message-ID: <1536411327-30127-1-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org debugfs_remove has taken the IS_ERR_OR_NULL into account. Just remove the unnecessary condition. Signed-off-by: zhong jiang --- drivers/md/bcache/super.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 2d26f9e..a3d2a94 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -1506,8 +1506,7 @@ static void cache_set_free(struct closure *cl) struct cache *ca; unsigned int i; - if (!IS_ERR_OR_NULL(c->debug)) - debugfs_remove(c->debug); + debugfs_remove(c->debug); bch_open_buckets_free(c); bch_btree_cache_free(c); -- 1.7.12.4