summaryrefslogtreecommitdiff
path: root/crypto/scatterwalk.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-02-09 14:22:14 +1100
committerHerbert Xu <herbert@gondor.apana.org.au>2009-02-09 14:30:25 +1100
commitab2867eed88e7823dc312e585a65c1c86040edc4 (patch)
tree2973da25894efebef2980db676f9cc91256b328d /crypto/scatterwalk.c
parent8aef01c98cb7fad71b02844b87e1ca8618e0d603 (diff)
downloadlinux-crypto-ab2867eed88e7823dc312e585a65c1c86040edc4.tar.gz
linux-crypto-ab2867eed88e7823dc312e585a65c1c86040edc4.zip
crypto: scatterwalk - Avoid flush_dcache_page on slab pages
It's illegal to call flush_dcache_page on slab pages on a number of architectures. So this patch avoids doing so if PageSlab is true. In future we can move the flush_dcache_page call to those page cache users that actually need it. Reported-by: David S. Miller <davem@davemloft.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/scatterwalk.c')
-rw-r--r--crypto/scatterwalk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c
index 9aeeb520..3de89a42 100644
--- a/crypto/scatterwalk.c
+++ b/crypto/scatterwalk.c
@@ -54,7 +54,8 @@ static void scatterwalk_pagedone(struct scatter_walk *walk, int out,
struct page *page;
page = sg_page(walk->sg) + ((walk->offset - 1) >> PAGE_SHIFT);
- flush_dcache_page(page);
+ if (!PageSlab(page))
+ flush_dcache_page(page);
}
if (more) {