summaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorMike Rapoport (Microsoft) <rppt@kernel.org>2026-05-28 12:53:01 +0300
committerAndrew Morton <akpm@linux-foundation.org>2026-06-05 00:49:28 +0300
commit19c000ba93d609e15e95fed76a9e3b8055833098 (patch)
tree1a5bb24e764ad7492238f9b3421b81e345082f7d /scripts/basic
parentd280a26a983f62bfeff3f134f9d5ba4035356b43 (diff)
downloadlinux-19c000ba93d609e15e95fed76a9e3b8055833098.tar.xz
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/635405e4-9423-4a25-a6e7-e03c8ea0bcbe@redhat.com Link: https://lore.kernel.org/20260528-lib-v4-2-4e3ad1277279@kernel.org Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: Christoph Hellwig <hch@infradead.org> Cc: Hannes Reinecke <hare@kernel.org> Cc: Li Nan <linan122@huawei.com> Cc: Song Liu <song@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions