diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-30 20:40:56 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-30 20:40:56 -0700 |
commit | 755948cfca16c71b16e8ff4a9d4dd31b1c0bf923 (patch) | |
tree | 7a058cfafabba3a10f499f0af89ac2be68cfe6bf /crypto/scatterwalk.c | |
parent | beff804d8dd360ccb4dd0096c9fd77a93fe9049e (diff) | |
parent | 9f1167272890c210399e6b8a32d7cf7295713f5d (diff) |
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
Diffstat (limited to 'crypto/scatterwalk.c')
-rw-r--r-- | crypto/scatterwalk.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c index 0f76175f623..81afd1790a1 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; |