On Wed, Sep 10, 2025 at 12:45:41PM +1000, NeilBrown wrote: > - dentry is negative and a shared lock is held on parent inode. > This is guaranteed for dentries passed to ->atomic_open when create > is NOT set. Umm... The same goes for tmpfile dentry while it's still negative (nobody else could make it positive - it's only reachable via the parent's list of children and those who traverse such will ignore anything negative unhashed they find there. > One thing I don't like is the name "unwrap_dentry()". It says what is > done rather than what it means or what the purpose is. > Maybe "access_dentry()" (a bit like rcu_access_pointer()). > Maybe "dentry_of()" - then we would want to call stable dentries > "stable_foo" or similar. So: > > static int afs_symlink(struct mnt_idmap *idmap, struct inode *dir, > struct stable_dentry stable_child, const char *content) That has too much of over-the-top hungarian notation feel for my taste, TBH... Note that these unwrap_dentry() are very likely to move into helpers - if some function is always called with unwrapped_dentry(something) as an argument, great, that's probably a candidate for struct stable_dentry. I'll hold onto the current variant for now...