On Thu, Nov 06, 2025 at 07:26:48PM -0800, Eric Biggers wrote: > > - * *never* fails when called from process contexts. (it might > > - * fail if called from an IRQ context.) > > - * Note: using __GFP_ZERO is not supported. > > + * Note: This function only sleeps if the alloc_fn callback sleeps or > > returns > > + * %NULL. Using __GFP_ZERO is not supported. > > Maybe put the note about __GFP_ZERO being unsupported directly in the > description of @gfp_mask.
I'll give it a try. > > * > > - * Return: pointer to the allocated element or %NULL on error. > > + * Return: pointer to the allocated element or %NULL on error. This > > function > > + * never returns %NULL when @gfp_mask allows sleeping. > > Is "allows sleeping" exactly the same as "__GFP_DIRECT_RECLAIM is set"? Yes. > The latter is what the code actually checks for. I'll see if I can make that more clear.
