]> Git Repo - linux.git/commit
mm: cleanup the gfp_mask handling in __vmalloc_area_node
authorChristoph Hellwig <[email protected]>
Sat, 17 Oct 2020 23:15:43 +0000 (16:15 -0700)
committerLinus Torvalds <[email protected]>
Sun, 18 Oct 2020 16:27:10 +0000 (09:27 -0700)
commitf255935b976729dbd8ddd079b96ddb6ecb1895bc
treed1c509277bc371630291d40f9423a5fd260fd810
parent301fa9f2ddf7fb248c188af292c9cc04f8283dff
mm: cleanup the gfp_mask handling in __vmalloc_area_node

Patch series "two small vmalloc cleanups".

This patch (of 2):

__vmalloc_area_node currently has four different gfp_t variables to
just express this simple logic:

 - use the passed in mask, plus __GFP_NOWARN and __GFP_HIGHMEM (if
   suitable) for the underlying page allocation
 - use just the reclaim flags from the passed in mask plus __GFP_ZERO
   for allocating the page array

Simplify this down to just use the pre-existing nested_gfp as-is for
the page array allocation, and just the passed in gfp_mask for the
page allocation, after conditionally ORing __GFP_HIGHMEM into it.  This
also makes the allocation warning a little more correct.

Also initialize two variables at the time of declaration while touching
this area.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Cc: Uladzislau Rezki (Sony) <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
mm/vmalloc.c
This page took 0.056762 seconds and 4 git commands to generate.