From: Christian Brauner <brauner@kernel.org>
To: NeilBrown <neilb@suse.de>
Cc: 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, Miklos Szeredi <miklos@szeredi.hu>,
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 3/6] ceph: return the correct dentry on mkdir
Date: Thu, 27 Feb 2025 20:01:39 +0100 [thread overview]
Message-ID: <20250227-dinge-jazzkonzert-3f68e3839fac@brauner> (raw)
In-Reply-To: <20250227013949.536172-4-neilb@suse.de>
On Thu, Feb 27, 2025 at 12:32:55PM +1100, NeilBrown wrote:
> ceph already splices the correct dentry (in splice_dentry()) from the
> result of mkdir but does nothing more with it.
>
> Now that ->mkdir can return a dentry, return the correct dentry.
>
> Note that previously ceph_mkdir() could call
> ceph_init_inode_acls()
> on the inode from the wrong dentry, which would be NULL. This
> is safe as ceph_init_inode_acls() checks for NULL, but is not
> strictly correct. With this patch, the inode for the returned dentry
> is passed to ceph_init_inode_acls().
>
> Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
> Signed-off-by: NeilBrown <neilb@suse.de>
> ---
> fs/ceph/dir.c | 24 ++++++++++++++++--------
> 1 file changed, 16 insertions(+), 8 deletions(-)
>
> diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
> index 39e0f240de06..5e98394e2dca 100644
> --- a/fs/ceph/dir.c
> +++ b/fs/ceph/dir.c
> @@ -1099,6 +1099,7 @@ static struct dentry *ceph_mkdir(struct mnt_idmap *idmap, struct inode *dir,
> struct ceph_client *cl = mdsc->fsc->client;
> struct ceph_mds_request *req;
> struct ceph_acl_sec_ctx as_ctx = {};
> + struc dentry *ret;
Forgot to mention that I fixed this when I applied.
next prev parent reply other threads:[~2025-02-27 19:01 UTC|newest]
Thread overview: 20+ 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 [this message]
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
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
-- strict thread matches above, loose matches on Subject: below --
2025-02-20 23:36 [PATCH 0/6] " NeilBrown
2025-02-20 23:36 ` [PATCH 3/6] ceph: return the correct dentry on mkdir NeilBrown
2025-02-21 1:48 ` Viacheslav Dubeyko
2025-02-24 2:15 ` NeilBrown
2025-02-24 22:09 ` Viacheslav Dubeyko
2025-02-24 22:53 ` Jeff Layton
2025-02-24 23:29 ` NeilBrown
2025-02-21 13:31 ` Jeff Layton
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=20250227-dinge-jazzkonzert-3f68e3839fac@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