On Thu, Mar 18, 2021 at 03:57:34PM -0400, Barret Rhoden wrote: > Prior to this commit, if you submitted the same callback_head twice, it > would be enqueued twice, but only if it was the last callback on the > list. The first time it was submitted, rq->balance_callback was NULL, > so head->next is NULL. That defeated the check in > queue_balance_callback(). > > This commit changes the callback list such that whenever an item is on > the list, its head->next is not NULL. The last element (first inserted) > will point to itself. This allows us to detect and ignore any attempt > to reenqueue a callback_head. > > Signed-off-by: Barret Rhoden <b...@google.com>
AFAICT you're patching dead code, please check a current tree.