Commit f255935
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 <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Uladzislau Rezki (Sony) <urezki@gmail.com>
Link: https://lkml.kernel.org/r/20201002124035.1539300-1-hch@lst.de
Link: https://lkml.kernel.org/r/20201002124035.1539300-2-hch@lst.de
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent 301fa9f commit f255935
1 file changed
Lines changed: 10 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2461 | 2461 | | |
2462 | 2462 | | |
2463 | 2463 | | |
2464 | | - | |
2465 | | - | |
2466 | 2464 | | |
2467 | | - | |
2468 | | - | |
2469 | | - | |
2470 | | - | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
2471 | 2468 | | |
2472 | | - | |
2473 | | - | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
2474 | 2472 | | |
2475 | 2473 | | |
2476 | 2474 | | |
2477 | | - | |
2478 | | - | |
| 2475 | + | |
| 2476 | + | |
2479 | 2477 | | |
2480 | 2478 | | |
2481 | 2479 | | |
| |||
2493 | 2491 | | |
2494 | 2492 | | |
2495 | 2493 | | |
2496 | | - | |
| 2494 | + | |
2497 | 2495 | | |
2498 | | - | |
| 2496 | + | |
2499 | 2497 | | |
2500 | 2498 | | |
2501 | 2499 | | |
| |||
0 commit comments