From: Christian Brauner <brauner@kernel.org>
To: NeilBrown <neilb@suse.de>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Jan Kara <jack@suse.cz>, Chuck Lever <chuck.lever@oracle.com>,
Jeff Layton <jlayton@kernel.org>,
Trond Myklebust <trondmy@kernel.org>,
Anna Schumaker <anna@kernel.org>,
linux-nfs@vger.kernel.org, Ilya Dryomov <idryomov@gmail.com>,
Xiubo Li <xiubli@redhat.com>,
ceph-devel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Richard Weinberger <richard@nod.at>,
Anton Ivanov <anton.ivanov@cambridgegreys.com>,
Johannes Berg <johannes@sipsolutions.net>,
linux-um@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/6 - REVISED] fuse: return correct dentry for ->mkdir
Date: Wed, 5 Mar 2025 11:53:37 +0100 [thread overview]
Message-ID: <20250305-bannen-zugriff-cd7508258062@brauner> (raw)
In-Reply-To: <174112490070.33508.15852253149143067890@noble.neil.brown.name>
On Wed, Mar 05, 2025 at 08:48:20AM +1100, NeilBrown wrote:
>
> Subject: [PATCH] fuse: return correct dentry for ->mkdir
>
> fuse already uses d_splice_alias() to ensure an appropriate dentry is
> found for a newly created dentry. Now that ->mkdir can return that
> dentry we do so.
>
> This requires changing create_new_entry() to return a dentry and
> handling that change in all callers.
>
> Note that when create_new_entry() is asked to create anything other than
> a directory we can be sure it will NOT return an alternate dentry as
> d_splice_alias() only returns an alternate dentry for directories.
> So we don't need to check for that case when passing one the result.
>
> Reviewed-by: Jeff Layton <jlayton@kernel.org>
> Signed-off-by: NeilBrown <neilb@suse.de>
> ---
> fs/fuse/dir.c | 48 +++++++++++++++++++++++++++++++-----------------
> 1 file changed, 31 insertions(+), 17 deletions(-)
>
> Thanks for the suggestion Miklos - this looks much better.
>
> Christian: could you please replace the fuse patch in your tree
> with this version? Thanks.
Sure, done so now. Thanks!
next prev parent reply other threads:[~2025-03-05 11:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-27 1:32 [PATCH 0/6 v2] Change ->mkdir() and vfs_mkdir() to return a dentry NeilBrown
2025-02-27 1:32 ` [PATCH 1/6] Change inode_operations.mkdir to return struct dentry * NeilBrown
2025-02-27 11:34 ` Christian Brauner
2025-02-27 1:32 ` [PATCH 2/6] hostfs: store inode in dentry after mkdir if possible NeilBrown
2025-02-27 1:32 ` [PATCH 3/6] ceph: return the correct dentry on mkdir NeilBrown
2025-02-27 19:01 ` Christian Brauner
2025-02-27 1:32 ` [PATCH 4/6] fuse: return correct dentry for ->mkdir NeilBrown
2025-03-03 14:46 ` Miklos Szeredi
2025-03-04 21:48 ` [PATCH 4/6 - REVISED] " NeilBrown
2025-03-05 10:53 ` Christian Brauner [this message]
2025-02-27 1:32 ` [PATCH 5/6] nfs: change mkdir inode_operation to return alternate dentry if needed NeilBrown
2025-02-27 1:32 ` [PATCH 6/6] VFS: Change vfs_mkdir() to return the dentry NeilBrown
2025-02-27 19:02 ` [PATCH 0/6 v2] Change ->mkdir() and vfs_mkdir() to return a dentry Christian Brauner
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=20250305-bannen-zugriff-cd7508258062@brauner \
--to=brauner@kernel.org \
--cc=anna@kernel.org \
--cc=anton.ivanov@cambridgegreys.com \
--cc=ceph-devel@vger.kernel.org \
--cc=chuck.lever@oracle.com \
--cc=idryomov@gmail.com \
--cc=jack@suse.cz \
--cc=jlayton@kernel.org \
--cc=johannes@sipsolutions.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=miklos@szeredi.hu \
--cc=neilb@suse.de \
--cc=richard@nod.at \
--cc=trondmy@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=xiubli@redhat.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).