async_tx: use memchr_inv

Use memchr_inv() to check the specified page is filled with zero.

Signed-off-by: Akinobu Mita <[email protected]>
Cc: Vinod Koul <[email protected]>
Cc: Dan Williams <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
This commit is contained in:
Akinobu Mita 2012-10-28 00:49:33 +09:00 • committed by Vinod Koul
commit 2c88ae9093

View file

@ -230,9 +230,7 @@ EXPORT_SYMBOL_GPL(async_xor);
static int page_is_zero(struct page *p, unsigned int offset, size_t len)
{
char *a = page_address(p) + offset;
return ((*(u32 *) a) == 0 &&
memcmp(a, a + 4, len - 4) == 0);
return !memchr_inv(page_address(p) + offset, 0, len);
}
static inline struct dma_chan *