Thread (61 messages) flat view 61 messages, 5 authors, 2026-03-17
STALE172d

[PATCH 44/53] hostfs: don't d_drop() before d_splice_alias() in hostfs_mkdir()

From: NeilBrown <hidden>
Date: 2026-03-12 21:56:15
Also in: ceph-devel, gfs2, linux-cifs, linux-efi, linux-ext4, linux-fsdevel, linux-mm, linux-nfs, linux-um, linux-unionfs, linux-xfs, lkml
Subsystem: filesystems (vfs and infrastructure), the rest, user-mode linux (uml) · Maintainers: Alexander Viro, Christian Brauner, Linus Torvalds, Richard Weinberger, Anton Ivanov, Johannes Berg

From: NeilBrown <neil@brown.name>

hostfs_mkdir() uses d_drop() and d_splice_alias() to ensure it has the
right dentry after a mkdir.
d_drop() is no longer needed here and will cause problem for future
changes to directory locking.  So remove the d_drop().

Signed-off-by: NeilBrown <neil@brown.name>
---
 fs/hostfs/hostfs_kern.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index abe86d72d9ef..f737f99710d5 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -700,7 +700,6 @@ static struct dentry *hostfs_mkdir(struct mnt_idmap *idmap, struct inode *ino,
 		dentry = ERR_PTR(err);
 	} else {
 		inode = hostfs_iget(dentry->d_sb, file);
-		d_drop(dentry);
 		dentry = d_splice_alias(inode, dentry);
 	}
 	__putname(file);
-- 
2.50.0.107.gf914562f5916.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help