Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp467131pxb; Thu, 7 Apr 2022 10:04:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxq6espyy/ogAhlwpJ6fRhr5D+ugitptozdrAttl/RJlyjOEgUip6ct/AJetUZK4JG3AyvT X-Received: by 2002:a05:6a00:1493:b0:505:6c5b:701b with SMTP id v19-20020a056a00149300b005056c5b701bmr2658285pfu.70.1649351080241; Thu, 07 Apr 2022 10:04:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649351080; cv=none; d=google.com; s=arc-20160816; b=jsB7O8GcLEhPaNr9tm8jLZ5/JeG3fGGzw2dE/d4Ix76K8mAECW38N6W+t1NA36RVcl UlL2F6OLJnU6fO0rRQXVHjoCEi37O64rATZHZJVmhtgebvvPbzr4ZocRqK+PXqux3BGq nFvwr8UjqT1sSKc2mJq/wgU9U5RQzFrsTJFO0+ZMpwdUCjoOBNIq1f/Ng3YhAlca0z4A V4+dBIU3rtdzksh+icCa0JvmOtpeBrFHFFlb1NbzcWScwWv6KLxk6Vgz9osQMnt7xL1i aMhxmm261t3OAriSe3Oq5P1heZL6uujWDBaN+cmjGxUUfZIcO5LHOtYr5TK3Fem6odff FaEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:mail-followup-to:reply-to:message-id :subject:cc:to:from:date:dkim-signature:dkim-signature; bh=l1Tzxv44rv0NjNRX4WlYNhE5cU//xGlEDNhpdKJU4PQ=; b=ctegMNs0c5b38Qa5YsDki9Dy8w7J/4xU27chtKz5WYiljeMFKaTI9HOOiH5HgBiD0E us5gb7k5aWDntwiYKcah64tRjPD7lkSlfaVy9cQRmIiZ+mOU76BpZh7gNv0weI8Ka9Gb FL2jwC7poSALUtVKNm5pFjamZqRUwjONOnZad0p0/MlTSy80cDHyUbwrLJsHop2ICblG BhvJpE61xXFcsOzy2XOOV64fR3XLz386XC1wGMv3EPKGwg82s/GrqDx9qviqAN9nk+uq xZw3iXZccE+DQkmyHCauOr/um/FP9p6R8qUTObgjTnBh5GbeBFbKLD+pItug1oRUE/TB 4mtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=22WOQxpz; dkim=neutral (no key) header.i=@suse.cz header.b=1qasprG3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u3-20020a170902a60300b00156a181ddb9si159763plq.399.2022.04.07.10.03.48; Thu, 07 Apr 2022 10:04:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=22WOQxpz; dkim=neutral (no key) header.i=@suse.cz header.b=1qasprG3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244553AbiDGKxx (ORCPT + 99 others); Thu, 7 Apr 2022 06:53:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244545AbiDGKxw (ORCPT ); Thu, 7 Apr 2022 06:53:52 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9B0BE6164; Thu, 7 Apr 2022 03:51:52 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 98F1221117; Thu, 7 Apr 2022 10:51:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1649328711; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=l1Tzxv44rv0NjNRX4WlYNhE5cU//xGlEDNhpdKJU4PQ=; b=22WOQxpzIbLL/gHYhoRUeNZsZwNXDn8q7nXiDhJ9x5xh2epQ/bJTHWJU5YAcw+dpBOdJC0 HWSutIPaFZBmZcv8PIpyJKClsQKZ4kGoT7xe/kYTQqnzvaodKaBAsbQgHiRVjX+VBAcC9F hnfjeINBtMi74UqV2J74zhHWIpoufNw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1649328711; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=l1Tzxv44rv0NjNRX4WlYNhE5cU//xGlEDNhpdKJU4PQ=; b=1qasprG3GnuRkCPq23tnKm4YcOmWoOAZz7RmjrLzwIqVc5DKs+iNhlxrTA6xYzuH9voXam Xkd85YDfLqNmWvAw== Received: from ds.suse.cz (ds.suse.cz [10.100.12.205]) by relay2.suse.de (Postfix) with ESMTP id 9FAD0A3B82; Thu, 7 Apr 2022 10:51:50 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 596A6DA80E; Thu, 7 Apr 2022 12:47:48 +0200 (CEST) Date: Thu, 7 Apr 2022 12:47:48 +0200 From: David Sterba To: cgel.zte@gmail.com Cc: dsterba@suse.cz, clm@fb.com, dsterba@suse.com, josef@toxicpanda.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, lv.ruyi@zte.com.cn Subject: Re: [PATCH] Btrfs: remove redundant judgment Message-ID: <20220407104748.GD15609@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, cgel.zte@gmail.com, clm@fb.com, dsterba@suse.com, josef@toxicpanda.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, lv.ruyi@zte.com.cn References: <20220406130453.GB15609@suse.cz> <20220407015700.2489671-1-lv.ruyi@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220407015700.2489671-1-lv.ruyi@zte.com.cn> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 Thu, Apr 07, 2022 at 01:57:00AM +0000, cgel.zte@gmail.com wrote: > < Ok, we can drop the check, have you looked if there are more similar > < places to update? > I found six by coccinelle, but they are in different paths.Should I > send one patch or six? As this is a simple change it can be in one patch, provided that it's the same logic (dropping inode check before iput). I've found only 2 instances with this coccinelle script: @@ expression E; @@ * if (E) * iput(E); -- not sure where you found 6.