• Al Viro's avatar
    fast_dput(): having ->d_delete() is not reason to delay refcount decrement · 15220fbf
    Al Viro authored
    ->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).
    Reviewed-by: default avatarChristian Brauner <brauner@kernel.org>
    Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    15220fbf
dcache.c 87.3 KB