Received: by 10.213.65.68 with SMTP id h4csp589016imn; Fri, 6 Apr 2018 05:49:21 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/rOCzLhfNYdsOLhNn81DRxi+epWZVGDq8W7VRwS7+tWzwzQCJrRut8615v++7KWekOoPoy X-Received: by 10.98.86.16 with SMTP id k16mr20443448pfb.149.1523018961364; Fri, 06 Apr 2018 05:49:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523018961; cv=none; d=google.com; s=arc-20160816; b=iOhWapnJB8IJXKpdTOBED6jk/2kTucw57uyhLh4ZHuzv+bAIdXeAQVo/MsWqykKp+d T6wIZgKewMCTaj8LkLC/kXQFn6J7m6DrltkavEpDm5UtAZXRXmECEvpMhc3hH7I3lEGa M2A2jotv0G11r0sS1nRStMo0h1AyDLYVfw3mNSEXb8zN1oNlWsRMqfBLV5KFmRAWcdrD dM8CWsJZJ20GBQ/ULVhgcN+6PmSNefSSktE61sy+CHkvGiCwtBIX+7fkq0g2DRvJDL06 QwJXgHNqVRUmYv+IU6sQ+IAUnnu/FuUem2rELEb5J3A7L8C4FA6kl39Hzhwh+JdLvaQl Q+Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:arc-authentication-results; bh=YY5B+jNKRVFFg+ASwEYzEdcQHB9FNskyPziiYxURiO8=; b=SkT7wCPs0zFgStFuwrVPigmqEA0Pv8M0jLNSCV1fmGInfGoh0SLSQ36gCm6XoMlG2a xn0iW7MYAPPAlszpCKzz8eGH1B5sQ9idoNClXAdiRtQQ3xYPjXFph0OG+P2qh5P4K7Yr 9UdWlMzzgZBO377pgRr+/hFUiKI/eZM9bO6bAfE/ywNT57dhmCt2ARECPFisPgUqX0Vn J0nE8RoIF1apvkz4QipkTfbLM5CjRTS6pqLxRSLg2lATUzhaDSEoJchVcX2fZQD0z9Ff 117xh5377PmQh+SOf9UiIfzLfB+dcpvGNRdjxDtxWIJ7eX43/qV19OreVRkCCwCiLy7V XEAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t73si7948366pfg.114.2018.04.06.05.49.07; Fri, 06 Apr 2018 05:49:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752745AbeDFMrR (ORCPT + 99 others); Fri, 6 Apr 2018 08:47:17 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:42437 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752021AbeDFMrQ (ORCPT ); Fri, 6 Apr 2018 08:47:16 -0400 Received: from mail-wr0-f198.google.com ([209.85.128.198]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1f4Qlv-0006Us-8D for linux-kernel@vger.kernel.org; Fri, 06 Apr 2018 12:47:15 +0000 Received: by mail-wr0-f198.google.com with SMTP id c1so707693wri.22 for ; Fri, 06 Apr 2018 05:47:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=YY5B+jNKRVFFg+ASwEYzEdcQHB9FNskyPziiYxURiO8=; b=gENJZkUzxtMULBsULFzvAwZArcR29vXRRdDiK1kTRZGKIIeBO26E3imlmIhSMQPESG /NvxusHsg1q/1XkBkkBl5zq72ZgAgbhlWM643y1QiTK+CLOJB3Aw1c/12WQ/iY++hJoe Q2Iai2bg6RZADlL1WtzELu80pn6XoNUTcBWgfiirahyKo7jyjPr38UrGPSBnf6zLW2hb XPrGVGCYBP9GBlYnxHwUFPNsOlPMHdySPOMU2KjnFtslujbFyb8Anshv69vuW1fT25zN 4kh2kelAz1lMXTJlVumcrqBB+xtCvMSDXlCkxVasw6VFE80IYG3xfrHHlrr5f3pREyKQ 3JXQ== X-Gm-Message-State: AElRT7EwCl8FW81oSAnYLSl9/YU/loqMpRmz+2aQKa0D0f3rBHU+lEup FRCldoNO45U4ciwaS9Z1gIYlla7gGdHLKPgoJZYBeY8XuvYREIcIHeyZOUBZ9v15Foual30PL7o +kkG4Oj5VEpC1Og40iVFfDxDZjUc0tIN4lDE1fqm3SQ== X-Received: by 10.28.129.80 with SMTP id c77mr12320196wmd.154.1523018834629; Fri, 06 Apr 2018 05:47:14 -0700 (PDT) X-Received: by 10.28.129.80 with SMTP id c77mr12320175wmd.154.1523018834234; Fri, 06 Apr 2018 05:47:14 -0700 (PDT) Received: from gmail.com (u-086-c080.eap.uni-tuebingen.de. [134.2.86.80]) by smtp.gmail.com with ESMTPSA id d17sm8359018wrc.45.2018.04.06.05.47.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Apr 2018 05:47:13 -0700 (PDT) From: Christian Brauner X-Google-Original-From: Christian Brauner Date: Fri, 6 Apr 2018 14:47:12 +0200 To: Linus Torvalds , Al Viro Cc: "Eric W. Biederman" , Linux Kernel Mailing List Subject: Re: [PATCH 0/3 RESEND] namei: add follow_up_bind() Message-ID: <20180406124711.GA9263@gmail.com> References: <20180405105103.21572-1-christian.brauner@ubuntu.com> <20180405174455.GA27462@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180405174455.GA27462@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 05, 2018 at 07:45:15PM +0200, Christian Brauner wrote: > On Thu, Apr 05, 2018 at 09:28:56AM -0700, Linus Torvalds wrote: > > On Thu, Apr 5, 2018 at 3:51 AM, Christian Brauner > > wrote: > > > > > > This series adds: > > > - follow_up_bind() to namei.{c,h} > > > - switches fs/nfsd/vfs.c:follow_to_parent() to use follow_up_bind() > > > - switches fs/devpts/inode.c:devpts_mntget() to use follow_up_bind() > > > > Hmm. Seems fair enough to me, although I wonder how much this really > > helps. It does get rid of a duplicate code pattern, but: > > > > 4 files changed, 14 insertions(+), 5 deletions(-) > > > > and while some of that is just the new comment, some of it is just "overhead". > > Fwiw, it does get read of these while loops in two places but I > personally see the biggest value in making it obvious what bind-mount > resolution means. > > > > > It's also a bit odd how the new helper is marked "inline", but nobody > > will inline it because it's not actually in the header file or any of > > the isers in the same C file. So instead, it has to be exported. I > > wonder if it should just be a trivial inline in ? Maybe > > it originally was, and that's where the inline came from, and then > > Christian decided to make it be by the regular "follow_up()" instead? > > I head it inline first but it would have required to forward declare > struct vfsmount in the head and I wasn't sure if that was going to fly. > But I explicitly left the inline in there because I was following > user_path_create() ([1], [2]) which does the same. But if that's an > issue I can make it static inline in the header like I had, forward > declare struct vfsmount and remove the unnecessary inline from > user_path_create() in a separate patch unless there's a specific reason > to leave it in there. > > [1]: https://elixir.bootlin.com/linux/latest/source/include/linux/namei.h#L79 > [2]: https://elixir.bootlin.com/linux/latest/source/fs/namei.c#L3680 In case that wasn't clear from the previous message: I'd wait for a go ahead on this if that's ok. Christian > > > > > But with all that said, I certainly don't *mind* the patch series. > > Cool. > > Thanks! > Christian > > > > > Al, I'm leaving this up to you, and expect to get it from your vfs > > tree eventually. Or not. > > > > Linus