Skip to content

Change ->mkdir() and vfs_mkdir() to return a dentry

NeilBrown ceph-devel linux-fsdevel linux-nfs linux-um lkml 3 versions – Applied

Status from this message: Applied to the vfs-6.15.async.dir branch of the vfs/vfs.git tree.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest posting 2/26 patches 5 repliesApplied
  2. v2 RFC posting 1/23 patches 8 repliesSuperseded
  3. v13 patches 0 repliesSuperseded

Patches in v2 posting 2/2 Applied

#Subject and filesSizeRepliesApplied
1/6Change inode_operations.mkdir to return struct dentry *Documentation/filesystems/locking.rst Documentation/filesystems/porting.rst Documentation/filesystems/vfs.rst +53 more+271 -2221 reply
2/6hostfs: store inode in dentry after mkdir if possible.fs/hostfs/hostfs_kern.c+9 -10 replies
3/6ceph: return the correct dentry on mkdirfs/ceph/dir.c+16 -81 reply
4/6fuse: return correct dentry for ->mkdirfs/fuse/dir.c+27 -211 reply
4/6fuse: return correct dentry for ->mkdirfs/fuse/dir.c+31 -171 reply
5/6nfs: change mkdir inode_operation to return alternate dentry if needed.fs/nfs/dir.c fs/nfs/nfs3proc.c fs/nfs/nfs4proc.c +2 more+60 -390 replies
6/6VFS: Change vfs_mkdir() to return the dentry.drivers/base/devtmpfs.c fs/cachefiles/namei.c fs/ecryptfs/inode.c +10 more+104 -1270 replies

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchJeff LaytonJan KaraViacheslav Dubeyko
1/6R-b R-b
2/6R-b
3/6R-b
4/6R-b R-b
4/6R-b R-b
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH 0/6 v2] Change ->mkdir() and vfs_mkdir() to return a dentry

This revised series contains a few clean-ups as requested by various people but no substantial changes.

It is based on vfs/vfs-6.15.async.dir plus vfs/vfs-6.15.sysv: I dropped the change to sysv as it seemed pointless preserving them.

I reviewed the mkdir functions in many (all?) filesystems and found a few that use d_instantiate() on an unlocked inode (after unlock_new_inode()) and also support export_operations. These could potentially call d_instantiate() on a directory inode which is already attached to an dentry, though making that happen would usually require guessing the filehandle correctly. I haven't tried to address those here, (this patch set doesn't make that situation any worse) but I may in the future.

Thanks,
NeilBrown

[PATCH 1/6] Change inode_operations.mkdir to return struct dentry * [PATCH 2/6] hostfs: store inode in dentry after mkdir if possible. [PATCH 3/6] ceph: return the correct dentry on mkdir [PATCH 4/6] fuse: return correct dentry for ->mkdir [PATCH 5/6] nfs: change mkdir inode_operation to return alternate [PATCH 6/6] VFS: Change vfs_mkdir() to return the dentry.