]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 31 Mar 2007 03:40:56 +0000 (20:40 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 31 Mar 2007 03:40:56 +0000 (20:40 -0700)
* 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

crypto/scatterwalk.c

index 0f76175f623fe9172566568f63124407225ce55e..81afd1790a1d1c28fc8a7e2569940401a668d5ac 100644 (file)
@@ -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;