Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp11033276pxu; Wed, 30 Dec 2020 20:36:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJyBJW/09g9qO/QwcKn0CIMuWFPeFKez1wvqkCb0Zj/qePREGljQFceqS/N1Ms4OdhkqdQ07 X-Received: by 2002:a17:906:ca08:: with SMTP id jt8mr50168604ejb.368.1609389361526; Wed, 30 Dec 2020 20:36:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609389361; cv=none; d=google.com; s=arc-20160816; b=nWWxIczT7w3VNyEmt1OyE/NV0zIl0Z3tpUu1k+u83rRBdTmqb2Ti4n7m5ogneZIgeo ysvVryRUIdQqYO0OomUzc6jMP/M/SGt1Z9ZJ9Jqv96D89A90FA99ufx80/R3Ov2PjfYa 9DXWOZhBGfW3wL1oGf6cRwWOayFGiuis2Op2H1Tnml8da7xQsaVlo/GVs7pttUOkhYOb Bhuvu6fj5QeXIjqocL39G/lbnuYXnKoTAyPjIOg/CNfHtdMzmtTuu/7WM4tH/BRJnTmd xiVsXpuZQIChnmH/c1PvvTaVJ2OtiqM60j0990WLNvQ7hemavMhLHR9rKofnom9ihm4s rsqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=QDDCacE96pL61jw0IMlIgSJwZyJWDmni7HH491PWvg4=; b=QGuI8y3HnuEGuqyvDdxzHxZGR8Fm2au6Pdp90X++gR7eDetEtI1GQiHcCAxUI47Ppo /fG/+T0kqf4fPDmEI+Pk794nD+qACm4/H7YAqGM+LJ1DFYFLt1zI8yBU869RM+rw7cnX fXd1EwqTUdzFBkDZN13gzUH12rBcQpFW9S/N8QoqF5ZsSTHBXYffj1yxNWMhkhQ1khio bOnAfc3Ktwfv9T8y6hAOIhyxdj7EQV/Y0ehr5mLwFFevm1cY48XT/2qtqU5PQZoR0ggf 2AmOeChErV8i8SaxESEbb1B/0aiqelXpLGqLfZzMYCmmzeRS4FE/e9VGWmtvHEytzrnM H4zA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si23217772edt.499.2020.12.30.20.35.38; Wed, 30 Dec 2020 20:36:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726230AbgLaEeI (ORCPT + 99 others); Wed, 30 Dec 2020 23:34:08 -0500 Received: from out4436.biz.mail.alibaba.com ([47.88.44.36]:54879 "EHLO out4436.biz.mail.alibaba.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726037AbgLaEeI (ORCPT ); Wed, 30 Dec 2020 23:34:08 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R581e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=joseph.qi@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0UKHGUt7_1609389194; Received: from B-D1K7ML85-0059.local(mailfrom:joseph.qi@linux.alibaba.com fp:SMTPD_---0UKHGUt7_1609389194) by smtp.aliyun-inc.com(127.0.0.1); Thu, 31 Dec 2020 12:33:14 +0800 Subject: Re: [PATCH] ocfs2: Remove redundant conditional before iput To: Yi Li , akpm@linux-foundation.org Cc: mark@fasheh.com, yilikernel@gmail.com, ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org References: <20201231040535.4091761-1-yili@winhong.com> From: Joseph Qi Message-ID: <53f4eb0e-87c8-f0a9-572f-76f40434f14f@linux.alibaba.com> Date: Thu, 31 Dec 2020 12:33:14 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20201231040535.4091761-1-yili@winhong.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/31/20 12:05 PM, Yi Li wrote: > iput handles NULL pointers gracefully, so there's no need to > check the pointer before the call. > > Signed-off-by: Yi Li Acked-by: Joseph Qi > --- > fs/ocfs2/super.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c > index 2febc76e9de7..079f8826993e 100644 > --- a/fs/ocfs2/super.c > +++ b/fs/ocfs2/super.c > @@ -973,8 +973,6 @@ static void ocfs2_disable_quotas(struct ocfs2_super *osb) > * quota files */ > dquot_disable(sb, type, DQUOT_USAGE_ENABLED | > DQUOT_LIMITS_ENABLED); > - if (!inode) > - continue; > iput(inode); > } > } >