Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: scatterwalk - Remove unnecessary advance in scatterwalk_pagedone

The offset advance in scatterwalk_pagedone not only is unnecessary,
but it was also buggy when it was needed by scatterwalk_copychunks.
As the latter has long ago been fixed to call scatterwalk_advance
directly, we can remove this unnecessary offset adjustment.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

+2 -6
+2 -6
crypto/scatterwalk.c
··· 62 62 flush_dcache_page(page); 63 63 } 64 64 65 - if (more) { 66 - walk->offset += PAGE_SIZE - 1; 67 - walk->offset &= PAGE_MASK; 68 - if (walk->offset >= walk->sg->offset + walk->sg->length) 69 - scatterwalk_start(walk, sg_next(walk->sg)); 70 - } 65 + if (more && walk->offset >= walk->sg->offset + walk->sg->length) 66 + scatterwalk_start(walk, sg_next(walk->sg)); 71 67 } 72 68 73 69 void scatterwalk_done(struct scatter_walk *walk, int out, int more)