dmapool: speedup DMAPOOL_DEBUG with init_on_alloc
authorTony Battersby <tonyb@cybernetics.com>
Thu, 26 Jan 2023 21:51:18 +0000 (13:51 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 6 Apr 2023 02:42:39 +0000 (19:42 -0700)
commit19f504584038f6d27846b19ee413a6ac1ee0f765
treeff0153a196a94f479a2ea2ce1153bbf6bd300725
parent347e4e44c0a98abcee3caadd222e3e3896c6d2a8
dmapool: speedup DMAPOOL_DEBUG with init_on_alloc

Avoid double-memset of the same allocated memory in dma_pool_alloc() when
both DMAPOOL_DEBUG is enabled and init_on_alloc=1.

Link: https://lkml.kernel.org/r/20230126215125.4069751-6-kbusch@meta.com
Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/dmapool.c