On Thu, Nov 09, 2023 at 06:20:42AM +0000, Al Viro wrote: > ->d_delete() is a way for filesystem to tell that dentry is not worth > keeping cached. It is not guaranteed to be called every time a dentry > has refcount drop down to zero; it is not guaranteed to be called before > dentry gets evicted. In other words, it is not suitable for any kind > of keeping track of dentry state. > > None of the in-tree filesystems attempt to use it that way, fortunately. > > So the contortions done by fast_dput() (as well as dentry_kill()) are > not warranted. fast_dput() certainly should treat having ->d_delete() > instance as "can't assume we'll be keeping it", but that's not different > from the way we treat e.g. DCACHE_DONTCACHE (which is rather similar > to making ->d_delete() returns true when called). > > Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx> > --- Reasoning seems sane to me, Reviewed-by: Christian Brauner <brauner@xxxxxxxxxx>