Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4146291pxk; Tue, 8 Sep 2020 11:50:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmXwwpnC/nfynIga5CWZ1hwzlrywHxjzS8CDF7Z7Uehxu+TzyUFkGA7d8/Zf8o91YPx4mg X-Received: by 2002:aa7:c053:: with SMTP id k19mr377913edo.326.1599591031544; Tue, 08 Sep 2020 11:50:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599591031; cv=none; d=google.com; s=arc-20160816; b=tmyVMjXNNDvIpq9JJjZsTeAFWyXkYnoxY2/NNXYcFmlRxV8yJ/FmlX2UQ32JObK6WQ cWH2aTq+l6ZCvUOoqn3YtUCiiDwTTllXKvImgvR5C91GhiJUEilYw4WsaS6uXnK86+S7 wsS/AZTmBUH6dmflgdthf0IBeaG5Q/AV1RD5aptZwV+8UbP/1NT7KBv5ELfSmL8lAdiq d/YyXQ6x7GLWOgo2ls4yMQNkaPOF9WlrPyppjFt7Q+bXcIlon6jYgVAqk+cnpWR6hGSD ZfZu26ogHyEANk8xt1jALxELakVqrxZazc2e8R+lHLzyQFxu4+RS5nLfWgMIa5mvrMQa ewjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=6O4OE3VMceniCvuBzEBelP9nbSB0TbRaIOl9uqQu/Is=; b=RxLQY2mCfeEPIdFVjGDserhUd5gouypjh6gKa+dU2f2kSUoyAo21oCVEB4aUfchHZM y9rI/+6HvEwFT9PoIHmdacNB85GbIavQq5cY33YzOjnG6EgZ2Q0HOxC/DjcBPXJH57Rl qJt7iXL2iHoVRWU7+7G1PpZseR32fyz0zi2fxxlT5eqcz8kpo/4pIeJo6d0k574WWllL 2VEpsT3iDj7B29swe9zo56Gpd+ZzlLJRDLTJhQRYBAvkBNyUoFw/25TXMFmZbgAJNE09 evqTiQcQsaOwU4SG18dD4uCA9n0r51NZwo8BD0TB4AZf9Ne9T76kidX8UuwsFLdlRzlg tSVw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a17si12556225ejc.540.2020.09.08.11.50.08; Tue, 08 Sep 2020 11:50:31 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731309AbgIHSta (ORCPT + 99 others); Tue, 8 Sep 2020 14:49:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726608AbgIHStG (ORCPT ); Tue, 8 Sep 2020 14:49:06 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7024FC061573; Tue, 8 Sep 2020 11:49:05 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFifp-00CnK8-Ad; Tue, 08 Sep 2020 18:48:57 +0000 Date: Tue, 8 Sep 2020 19:48:57 +0100 From: Al Viro To: Hao Lee Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] fs: Eliminate a local variable to make the code more clear Message-ID: <20200908184857.GT1236603@ZenIV.linux.org.uk> References: <20200729151740.GA3430@haolee.github.io> <20200908130656.GC22780@haolee.github.io> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200908130656.GC22780@haolee.github.io> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 08, 2020 at 01:06:56PM +0000, Hao Lee wrote: > ping > > On Wed, Jul 29, 2020 at 03:21:28PM +0000, Hao Lee wrote: > > The dentry local variable is introduced in 'commit 84d17192d2afd ("get > > rid of full-hash scan on detaching vfsmounts")' to reduce the length of > > some long statements for example > > mutex_lock(&path->dentry->d_inode->i_mutex). We have already used > > inode_lock(dentry->d_inode) to do the same thing now, and its length is > > acceptable. Furthermore, it seems not concise that assign path->dentry > > to local variable dentry in the statement before goto. So, this function > > would be more clear if we eliminate the local variable dentry. How does it make the function more clear? More specifically, what analysis of behaviour is simplified by that?