mm/zsmalloc: avoid unnecessary iteration in get_pages_per_zspage()

If we find a zspage with usage == 100%, there is no need to try other
zspages.

Link: http://lkml.kernel.org/r/1462425447-13385-1-git-send-email-opensource.ganesh@gmail.com
Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index f9b58d1..3d6d3da 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -770,6 +770,9 @@
 		if (usedpc > max_usedpc) {
 			max_usedpc = usedpc;
 			max_usedpc_order = i;
+
+			if (max_usedpc == 100)
+				break;
 		}
 	}