On Thu, Nov 09, 2023 at 03:46:21PM +0100, Christian Brauner wrote: > On Thu, Nov 09, 2023 at 06:20:43AM +0000, Al Viro wrote: > > If refcount is less than 1, we should just warn, unlock dentry and > > return true, so that the caller doesn't try to do anything else. > > That's effectively to guard against bugs in filesystems, not in dcache > itself, right? Have we observed this frequently? Hard to tell - it doesn't happen often, but... extra dput() somewhere is not an impossible class of bugs. I remember running into that while doing work in namei.c, I certainly have seen failure exits in random places that fucked refcounting up by dropping the wrong things.