Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB3EFC11D32 for ; Mon, 24 Feb 2020 17:18:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD27720836 for ; Mon, 24 Feb 2020 17:18:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727862AbgBXRSm (ORCPT ); Mon, 24 Feb 2020 12:18:42 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:48104 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727426AbgBXRSl (ORCPT ); Mon, 24 Feb 2020 12:18:41 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6HNP-000Pok-RL; Mon, 24 Feb 2020 17:18:39 +0000 Date: Mon, 24 Feb 2020 17:18:39 +0000 From: Al Viro To: Nikolay Borisov Cc: linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] vfs: Rename __is_local_mountpoint to is_local_mountpoint Message-ID: <20200224171839.GB23230@ZenIV.linux.org.uk> References: <20200224170142.5604-1-nborisov@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200224170142.5604-1-nborisov@suse.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Mon, Feb 24, 2020 at 07:01:42PM +0200, Nikolay Borisov wrote: > Current is_local_mountpoint is a simple wrapper with added d_mountpoint > check. However, the same check is the first thing which > __is_local_mountpoint performs. So remove the wrapper and promote the > private helper to is_local_mountpoint. No semantics changes. NAK. "No semantics changes" does not cut it - inline helper that checks some unlikely condition and calls an out-of-line version is a fairly common pattern, with legitimate uses. It *may* be unwarranted here, but you need more serious analysis than that. I'm not saying that the patch is wrong, but you'll also need to explain why removing the check from __is_local_mountpoint() (and marking the condition unlikely in the wrapper) would be worse than what you propose.