]> Gentwo Git Trees - linux/.git/commit
VFS: introduce end_creating_keep()
authorNeilBrown <neil@brown.name>
Thu, 13 Nov 2025 00:18:38 +0000 (11:18 +1100)
committerChristian Brauner <brauner@kernel.org>
Fri, 14 Nov 2025 12:15:58 +0000 (13:15 +0100)
commitcf296b294c3bd8f7db229060efe677dfd49e46b6
treef95c11fca54fe2b9184e92ebbd1abaaf2275801c
parentfe497f0759e0efb949f9480911d00b6045c21f50
VFS: introduce end_creating_keep()

Occasionally the caller of end_creating() wants to keep using the dentry.
Rather then requiring them to dget() the dentry (when not an error)
before calling end_creating(), provide end_creating_keep() which does
this.

cachefiles and overlayfs make use of this.

Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: NeilBrown <neil@brown.name>
Link: https://patch.msgid.link/20251113002050.676694-16-neilb@ownmail.net
Tested-by: syzbot@syzkaller.appspotmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/cachefiles/namei.c
fs/overlayfs/dir.c
fs/overlayfs/super.c
include/linux/namei.h