Files
erofs-linux/lib/raid/raid6
Mike Rapoport (Microsoft) 19c000ba93 raid6: use kmalloc() in raid6_select_algo()
raid6_select_algo() allocates 8 pages for buffer that is used
as a scratch area for selection of the best algorithm.

This buffer can be allocated with kmalloc() as there's nothing special
about it to go directly to the page allocator.

kmalloc() provides a better API than ancient __get_free_pages().
kmalloc() does not require ugly casts and kfree() does not need to know the
size of the freed object.

There is no performance difference because kmalloc() redirects allocations
of such size to the page allocator.

Replace __get_free_pages() call with kmalloc().

Link: https://lore.kernel.org/all/[email protected]
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Mike Rapoport (Microsoft) <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Cc: Li Nan <[email protected]>
Cc: Song Liu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
2026-06-04 14:49:28 -07:00
..
2026-05-28 21:24:55 -07:00
2026-05-28 21:24:55 -07:00
2026-05-28 21:24:55 -07:00
2026-05-28 21:24:54 -07:00
2026-05-28 21:24:55 -07:00
2026-05-28 21:24:55 -07:00