llist: add llist_del_first_this()
authorNeilBrown <neilb@suse.de>
Mon, 11 Sep 2023 14:39:37 +0000 (10:39 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 16 Oct 2023 16:44:06 +0000 (12:44 -0400)
commit8a3e5975ed11dd16d81dc501b514ab01986db94e
tree1e14c66306c4e7463ab715a5e1ceed5768cdd438
parent9bd4161c591710f152a8cd3ed85ea928c61e26ca
llist: add llist_del_first_this()

llist_del_first_this() deletes a specific entry from an llist, providing
it is at the head of the list.  Multiple threads can call this
concurrently providing they each offer a different entry.

This can be uses for a set of worker threads which are on the llist when
they are idle.  The head can always be woken, and when it is woken it
can remove itself, and possibly wake the next if there is an excess of
work to do.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
include/linux/llist.h
lib/llist.c