swiotlb: fix setting ->force_bounce
authorChristoph Hellwig <hch@lst.de>
Wed, 1 Jun 2022 18:49:39 +0000 (20:49 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 2 Jun 2022 05:17:59 +0000 (07:17 +0200)
commite15db62bc5648ab459a570862f654e787c498faf
tree9e5919c33c28c858fbd2182556abad35a9042ec8
parente19f8fa6ce1ca9b8b934ba7d2e8f34c95abc6e60
swiotlb: fix setting ->force_bounce

The swiotlb_init refactor messed up assigning ->force_bounce by doing
it in different places based on what caused the setting of the flag.

Fix this by passing the SWIOTLB_* flags to swiotlb_init_io_tlb_mem
and just setting it there.

Fixes: c6af2aa9ffc9 ("swiotlb: make the swiotlb_init interface more useful")
Reported-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Nathan Chancellor <nathan@kernel.org>
kernel/dma/swiotlb.c