summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-30 20:40:56 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-30 20:40:56 -0700
commit3ca3c24934201944371bb94ee00ffdd6a9e7be3d (patch)
treea0f4e751b0c39dc4928d2e9ceb13b2b5528117ad
parentfcf854946bfada1e50458e7e55abcbb35804cacb (diff)
parent6f916f74e242c0e40e0a7b93a4a22e44ed8580ac (diff)
downloadlinux-crypto-3ca3c24934201944371bb94ee00ffdd6a9e7be3d.tar.gz
linux-crypto-3ca3c24934201944371bb94ee00ffdd6a9e7be3d.zip
Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6: [CRYPTO] api: Flush the current page right than the next [CRYPTO] api: Use the right value when advancing scatterwalk_copychunks
-rw-r--r--crypto/scatterwalk.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c
index 0f76175f..81afd179 100644
--- a/crypto/scatterwalk.c
+++ b/crypto/scatterwalk.c
@@ -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;