OSDN Git Service

dmapool: simplify freeing
authorKeith Busch <kbusch@kernel.org>
Thu, 26 Jan 2023 21:51:22 +0000 (13:51 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 6 Apr 2023 02:42:40 +0000 (19:42 -0700)
commit887aef615818dba18333be6f08de1922a475a15b
tree6e11a9892135adec474b686473f7f1efcb4012f5
parent2591b516533ba2564f086bd88f1f5e97084e4b1c
dmapool: simplify freeing

The actions for busy and not busy are mostly the same, so combine these
and remove the unnecessary function.  Also, the pool is about to be freed
so there's no need to poison the page data since we only check for poison
on alloc, which can't be done on a freed pool.

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