mm/vmalloc: be more explicit about supported gfp flags

The core of the vmalloc allocator __vmalloc_area_node doesn't say
anything about gfp mask argument.  Not all gfp flags are supported
though.  Be more explicit about constraints.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Michal Hocko <[email protected]>
Cc: Dave Chinner <[email protected]>
Cc: Neil Brown <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Uladzislau Rezki <[email protected]>
Cc: Ilya Dryomov <[email protected]>
Cc: Jeff Layton <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Michal Hocko authored and Linus Torvalds committed 2021-11-06 13:30:37 -07:00
1 parent 3252b1d830
commit b7d90e7a5e
1 file changed
+10 -2
+10 -2
View File
@@ -2983,8 +2983,16 @@ fail:
* @caller: caller's return address
*
* Allocate enough pages to cover @size from the page level
* allocator with @gfp_mask flags. Map them into contiguous
* kernel virtual space, using a pagetable protection of @prot.
* allocator with @gfp_mask flags. Please note that the full set of gfp
* flags are not supported. GFP_KERNEL would be a preferred allocation mode
* but GFP_NOFS and GFP_NOIO are supported as well. Zone modifiers are not
* supported. From the reclaim modifiers__GFP_DIRECT_RECLAIM is required (aka
* GFP_NOWAIT is not supported) and only __GFP_NOFAIL is supported (aka
* __GFP_NORETRY and __GFP_RETRY_MAYFAIL are not supported).
* __GFP_NOWARN can be used to suppress error messages about failures.
*
* Map them into contiguous kernel virtual space, using a pagetable
* protection of @prot.
*
* Return: the address of the area or %NULL on failure
*/