[$] The kernel “closure” API

Post Syndicated from corbet original https://lwn.net/Articles/957187/

The data structure known as a “closure” first found its way into the
mainline kernel with the addition of bcache in the 3.10 development
cycle. With the advent of bcachefs in
6.7, though, it acquired a second user and was moved to the kernel’s
lib directory, making it available to other kernel users as well.
The documentation of closures in the source is better than that of many
things in the kernel, but there is still room for a gentler introduction.