Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp39133pxh; Thu, 7 Apr 2022 13:17:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyphfgMBdjo6epeKFktSxPLEv4iK8zHp7KyfHWzSjQw5m4D4wuxIKIBV49RvZ2LdBZSTKqs X-Received: by 2002:a63:2ad0:0:b0:398:31d7:9955 with SMTP id q199-20020a632ad0000000b0039831d79955mr12354572pgq.198.1649362660288; Thu, 07 Apr 2022 13:17:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649362660; cv=none; d=google.com; s=arc-20160816; b=ynyHuohn4a/5iE3gzs5Rc4K7TwpWQnGf6dOMvT30EFFeP1rph8pgwZCHTV4gpOjwiZ rbwcalXV6+Vz5c4UZNmlpnlmVV8SLFrcgOGG0bNYw7rn3bFVl6pYy2X5FqG+ebhEfYS3 PKx2nOsML0y22GmmZDpmPmcvZBfyPvlwpcqBgDkeFDNWiGPI/9DrE17syCS8ybGhiFg/ 37+icQ6Uapa73rXbNTpGjRDNVDb/dzL2GNpTy6J6awbrPMElHTX/OUfYzDjxqHOrFZBq Sq9bYPkrJb73Xyzea9YE7P+vMAtsM2t5wWhlvYtxpHZ05pF+WUaaWltXXjnqekMuOvOt Oovg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=RauWYFKn7b3frPtWbzcKVPvaLdrIASzDTVt0nwCnfK8=; b=FZRE4PljHjMvraVMFIBDv+TNFEt+95p9//6wiZdnt4fKZoAzUbSMguQ9oHjKgSVc38 TZ+G6b4wWwwXq7xutPRD74ETrpmjzFl0jXn88IYH6KNQDJ1KMBLBhPT3wFGgD56tM+U0 904RD30WNBXhIP0MmrvsnUpa03cudoMmKiNc5o87fByIq25sQc6PgE7KngmrwLQQpZhD b2/ZLe6jnNNcTnU4Zp+xKASUSYpmQ05RpJ6oPlkGJjuNyZYGwSLJG5yM7Ht7VjoUz434 6T1hWK6Y5X2jCZTEckIP0iX7MpkOdBQ3xUdvDsc4655gJBT5OgfpyqyjtG9z7qpORayn jGKw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u39-20020a056a0009a700b004fadadfe285si20597214pfg.335.2022.04.07.13.17.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 13:17:40 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 400112FB1AF; Thu, 7 Apr 2022 12:36:40 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239981AbiDGPDz (ORCPT + 99 others); Thu, 7 Apr 2022 11:03:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232775AbiDGPDy (ORCPT ); Thu, 7 Apr 2022 11:03:54 -0400 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C06DF270E; Thu, 7 Apr 2022 08:01:53 -0700 (PDT) Received: from cwcc.thunk.org (pool-108-7-220-252.bstnma.fios.verizon.net [108.7.220.252]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 237F1h7G022667 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 7 Apr 2022 11:01:43 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 3466715C3EE7; Thu, 7 Apr 2022 11:01:43 -0400 (EDT) Date: Thu, 7 Apr 2022 11:01:43 -0400 From: "Theodore Ts'o" To: cgel.zte@gmail.com Cc: adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, Lv Ruyi , Zeal Robot Subject: Re: [PATCH] ext4: remove redundant judgment Message-ID: References: <20220406090501.2488853-1-lv.ruyi@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220406090501.2488853-1-lv.ruyi@zte.com.cn> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 06, 2022 at 09:05:01AM +0000, cgel.zte@gmail.com wrote: > From: Lv Ruyi > > iput() has already handled null and non-null parameter. so there is no > need to use if(). > > Reported-by: Zeal Robot > Signed-off-by: Lv Ruyi I'd use the word "conditional" instead of "judgment", so I'd suggest rewording it as: >ext4: remove unnecessary conditional > > >iput() already tests to see if it is called with a NULL argument, so >there is no need to check if the inode is NULL before calling iput(). I've noticed that you've submitted this for other subsystems, so I'd thought I'd mention it before just applying the patch and quietly adjusting the commit description for clarity. - Ted