Re: [PATCH/RFC 00/18] VFS/nfsd: replace dentry_create()
Christian Brauner <[email protected]>
| Newsgroups | gmane.linux.file-systems,gmane.linux.nfs |
|---|---|
| Message-ID | <20260702-kurswechsel-grundlos-erdteil-27c448aef1ec@brauner> |
On 2026-06-01 16:37 +1000, NeilBrown wrote: > My recent proposal for inverting the order between inode_lock() on a > parent dir and d_alloc_parallel()[1] missed that fact that atomic_open() > has two callers, and would have resulted in easy deadlocks from nfsd > when re-exporting and NFS filesystem. > > I think the best way to fix this is to provide a richer interface for > nfsd to use, which includes all the locking as well as inode_operations > calls. This allows the nfsd behaviour to share more code with the > system-call behaviour. > > This series refactors code between lookup_open() and > open_last_lookups(), and uses the new lookup_open() to provide > vfs_lookup_open(). It then rearranges the code in nfsd so that it can > easily use vfs_lookup_open() instead of dentry_create(). Finally > dentry_create() is removed. > > This series is based on a merge of nfsd-testing, vfs-next/work.dcache, > and vfs/vfs.fixes (though I can't see my "Fix possible failure to > unlock.."[2] patch in there yet). So I probably will need to resubmit > after a bunch of that has hit mainline - though a few of the patches Yes, please resubmit. > This will conflict with the O_CREAT|O_DIRECTORY work so obviously we'll need to > work out how to order them once we both have enough positive review. I have that on my todo but somehow said todo keeps growing...