linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Brian Foster <bfoster@redhat.com>
Cc: linux-fsdevel@vger.kernel.org, Ian Kent <raven@themaw.net>
Subject: Re: [PATCH v2 RESEND] namei: clear nd->root.mnt before O_CREAT unlazy
Date: Sun, 2 Oct 2022 01:06:22 +0100	[thread overview]
Message-ID: <YzjV/qCcHDH7gfLZ@ZenIV> (raw)
In-Reply-To: <20220923140334.514276-1-bfoster@redhat.com>

On Fri, Sep 23, 2022 at 10:03:34AM -0400, Brian Foster wrote:

> incompatible with O_CREAT. Otherwise the tradeoff for this change is
> that this may impact behavior when an absolute path O_CREAT lookup
> lands on a symlink that contains another absolute path. The unlazy
> sequence of the create lookup now clears the nd->root mount pointer,
> which means that once we read said link via step_into(), the
> subsequent nd_jump_root() calls into set_root() to grab the mount
> pointer again (from refwalk mode). This is historical behavior for
> O_CREAT and less common than the current behavior of a typical
> create lookup unnecessarily legitimizing the root dentry.

I'm not worried about the overhead of retrieving the root again;
using the different values for beginning and the end of pathwalk,
OTOH...

It's probably OK, but it makes analysis harder.  Do we have a real-world
testcases where the contention would be observable?

  reply	other threads:[~2022-10-02  0:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-23 14:03 [PATCH v2 RESEND] namei: clear nd->root.mnt before O_CREAT unlazy Brian Foster
2022-10-02  0:06 ` Al Viro [this message]
2022-10-04 17:09   ` Brian Foster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YzjV/qCcHDH7gfLZ@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=bfoster@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=raven@themaw.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).