X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=crypto%2Fscatterwalk.c;h=8b5969987c0d8ee03524ce7ffe8f1193cf29d84e;hb=4a6561b37ea65b4a98bd8fe16c57f231b1502302;hp=41e529af0773181a115a04c932a1d38216745c06;hpb=a9ad99a612763803b995ce551ca43b20beb1f888;p=pandora-kernel.git diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c index 41e529af0773..8b5969987c0d 100644 --- a/crypto/scatterwalk.c +++ b/crypto/scatterwalk.c @@ -68,7 +68,8 @@ static void scatterwalk_pagedone(struct scatter_walk *walk, int out, void scatterwalk_done(struct scatter_walk *walk, int out, int more) { - if (!(scatterwalk_pagelen(walk) & (PAGE_SIZE - 1)) || !more) + if (!more || walk->offset >= walk->sg->offset + walk->sg->length || + !(walk->offset & (PAGE_SIZE - 1))) scatterwalk_pagedone(walk, out, more); } EXPORT_SYMBOL_GPL(scatterwalk_done);