diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2009-02-09 06:22:14 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2009-02-09 06:30:25 +0300 |
commit | 4f3e797ad07d52d34983354a77b365dfcd48c1b4 (patch) | |
tree | 0c45ac9add06b72dac5e1da1c0023aa019ff2ac2 | |
parent | 412e87ae5d852bc3d836f475c19d954b3324363d (diff) | |
download | linux-4f3e797ad07d52d34983354a77b365dfcd48c1b4.tar.xz |
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>
-rw-r--r-- | crypto/scatterwalk.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c index 9aeeb52004a5..3de89a424401 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) { |