From: Herbert Xu Date: Mon, 9 Feb 2009 03:22:14 +0000 (+1100) Subject: crypto: scatterwalk - Avoid flush_dcache_page on slab pages X-Git-Tag: upstream/snapshot3+hdmi~20289^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f3e797ad07d52d34983354a77b365dfcd48c1b4;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: Herbert Xu --- diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c index 9aeeb52..3de89a4 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) {