On Tue, Sep 09, 2025 at 02:43:21PM +1000, NeilBrown wrote: > d_instantiate(dentry, inode); > - dget(dentry); > -fail: > - inode_unlock(d_inode(parent)); > - return dentry; > + return simple_end_creating(dentry); No. This is the wrong model - dget() belongs with d_instantiate() here; your simple_end_creating() calling conventions are wrong. What really happens is a controlled leak. simple_start_creating() in the beginning is correct, but the right model here is to have identical refcounting logics on the exits - the only difference should be in having done that combination on success. Please, leave those alone for now.