WTF? get_dma_ops is privat to the DMA API layer, and dmapool has nodetermine whether the memory is allocated by "dma_alloc_from_dev_coherent".
And use "get_dma_ops" to determine whether the memory is allocated by
"dma_direct_alloc".
business even using that. Even independent of this particular case,
consumers of an API never have any business looking at the implementation
of the API, that is the whole point of the abstraction.
It's not even that, the change here is just obviously broken, since it endsAnd yes, in addition to that it also is completely broken.
up entirely ignoring want_init_on_alloc() for devices using dma-direct.
Sure, the memory backing a dma_page is zeroed *once* by its initial
dma-coherent allocation, but who says we're not not reallocating pool
entries from an existing dma_page?