linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Amir Goldstein <amir73il@gmail.com>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Miklos Szeredi <miklos@szeredi.hu>
Subject: Re: [RFC][PATCH] ovl_create_index(): vfs_mkdir() might succeed leaving dentry negative unhashed
Date: Sun, 13 May 2018 23:50:10 +0100	[thread overview]
Message-ID: <20180513225010.GZ30522@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CAOQ4uxi7Dk=th3ZwBHpxY+yF45-0FKbEXqwRB8HeH_CBr0HAOQ@mail.gmail.com>

On Sat, May 12, 2018 at 07:49:21AM +0300, Amir Goldstein wrote:

> :-/ this pattern is too nasty to be open codes twice in ovl and
> once in knfsd.
> For ovl, we can hoist this into the ovl_do_mkdir() helper, but
> what filesystems really need is vfs_mkdir_hashed(), then knfsd
> can use it as well.

Not really - handling of that case is really different for different
callers, especially if you look into the "it's managed to disappear
in between ->mkdir and ->lookup" case.  Passing by reference seriously
limits what the callers can do; if it works for overlayfs, more power
to you, but it's not a good general-purpose helper.

  reply	other threads:[~2018-05-13 22:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-12  1:25 [RFC][PATCH] ovl_create_index(): vfs_mkdir() might succeed leaving dentry negative unhashed Al Viro
2018-05-12  1:29 ` [PATCH][RFC] ovl_create_real(): make it cope with vfs_mkdir() safely Al Viro
2018-05-12  5:13   ` Amir Goldstein
2018-05-12  8:55     ` Amir Goldstein
2018-05-12  4:49 ` [RFC][PATCH] ovl_create_index(): vfs_mkdir() might succeed leaving dentry negative unhashed Amir Goldstein
2018-05-13 22:50   ` Al Viro [this message]
2018-05-14 15:04 ` Miklos Szeredi
2018-05-14 15:39   ` Al Viro

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=20180513225010.GZ30522@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=amir73il@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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).