]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
zram: do not skip the first bucket
authorSergey Senozhatsky <senozhatsky@chromium.org>
Tue, 1 Oct 2024 08:55:56 +0000 (17:55 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 1 Nov 2024 04:28:42 +0000 (21:28 -0700)
A small fixup.

Link: https://lkml.kernel.org/r/20241001085634.1948384-1-senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/zram/zram_drv.c

index 623d629c6680ad1754cbf0c0e96ac9265ea62bfc..f57ffb92016675cd3f8ea62a9780f0587c84c113 100644 (file)
@@ -264,7 +264,7 @@ static struct zram_pp_slot *select_pp_slot(struct zram_pp_ctl *ctl)
        s32 idx = NUM_PP_BUCKETS - 1;
 
        /* The higher the bucket id the more optimal slot post-processing is */
-       while (idx > 0) {
+       while (idx >= 0) {
                pps = list_first_entry_or_null(&ctl->pp_buckets[idx],
                                               struct zram_pp_slot,
                                               entry);