mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
[CRYPTO] api: Flush the current page right than the next
On platforms where flush_dcache_page is needed we're currently flushing the next page right than the one we've just processed. This patch fixes the off-by-one error. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
4ee531a3e6
commit
9f11672728
1 changed files with 6 additions and 2 deletions
|
@ -59,8 +59,12 @@ EXPORT_SYMBOL_GPL(scatterwalk_map);
|
|||
static void scatterwalk_pagedone(struct scatter_walk *walk, int out,
|
||||
unsigned int more)
|
||||
{
|
||||
if (out)
|
||||
flush_dcache_page(scatterwalk_page(walk));
|
||||
if (out) {
|
||||
struct page *page;
|
||||
|
||||
page = walk->sg->page + ((walk->offset - 1) >> PAGE_SHIFT);
|
||||
flush_dcache_page(page);
|
||||
}
|
||||
|
||||
if (more) {
|
||||
walk->offset += PAGE_SIZE - 1;
|
||||
|
|
Loading…
Reference in a new issue