aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crypto/scatterwalk.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c
index 0f76175f623f..81afd1790a1d 100644
--- a/crypto/scatterwalk.c
+++ b/crypto/scatterwalk.c
@@ -59,8 +59,12 @@ EXPORT_SYMBOL_GPL(scatterwalk_map);
59static void scatterwalk_pagedone(struct scatter_walk *walk, int out, 59static void scatterwalk_pagedone(struct scatter_walk *walk, int out,
60 unsigned int more) 60 unsigned int more)
61{ 61{
62 if (out) 62 if (out) {
63 flush_dcache_page(scatterwalk_page(walk)); 63 struct page *page;
64
65 page = walk->sg->page + ((walk->offset - 1) >> PAGE_SHIFT);
66 flush_dcache_page(page);
67 }
64 68
65 if (more) { 69 if (more) {
66 walk->offset += PAGE_SIZE - 1; 70 walk->offset += PAGE_SIZE - 1;