X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=crypto%2Fscatterwalk.c;h=8b5969987c0d8ee03524ce7ffe8f1193cf29d84e;hp=41e529af0773181a115a04c932a1d38216745c06;hb=e5238fca9694d61861096d5fb80685c9f6581555;hpb=ecca1a34befbb13fc23d9a2cc0d6b725c7727fb2 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);