On Wed, Jun 12, 2013 at 1:03 PM, Davidlohr Bueso <davidlohr.bu...@hp.com> wrote: > > Waiman's dcache patchet were actually an attempt to address these exact > issues: http://lkml.org/lkml/2013/5/22/716
Ok, looking at that patch-set, I think it has the same race with not atomically getting the d_lock spinlock and d_count going down to zero in dput(). And Waiman clearly didn't know about "atomic_inc_not_zero()" or "atomic_dec_and_lock()" that are designed for exactly the "increment if already nonzero" and "decrement without taking the lock if we're not going down to zero" cases. As outlined, I'm also not at all sure that the whole seqrw-lock thing that Waiman did is really necessary - I think the optimistic dget_parent() might be sufficient. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/