On Tue, May 7, 2019 at 12:55 PM Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > > > Provided that lockref.c is updated accordingly (look at e.g. > lockref_get_not_zero()). Yeah, we should likely just make this all a lockref feature. The dcache is *almost* the only user of lockrefs. We've got them in gfs2 too, but that looks like it would be perfectly happy with the same model. > lockref_get_not_zero() hitting dead dentry is not abnormal, > so we'd better not complain in such case... BTW, wouldn't that WARN_ON() > in dget() belong in lockref_get()? Yeah. Linus