On Wed, Nov 24, 2021 at 05:14:53PM +0000, Trond Myklebust wrote: > It is a little nasty that we hide the list_del() calls in several > levels of function call, so they probably do deserve a comment. > > That said, if, as in the case here, the delegation was unhashed, we > still end up not calling list_del_init() in unhash_delegation_locked(), > and since the list_add() is not conditional on it being successful, the > global list is again corrupted. > > Yes, it is an unlikely race, but it is possible despite your change. Thanks, good point. Probably not something anyone's actually hitting, but another sign this logic need rethinking. --b.