From 8a3445eb614ad23e206146c4489a10564d5c1cb1 Mon Sep 17 00:00:00 2001 From: Sergey Senozhatsky Date: Tue, 1 Oct 2024 17:55:56 +0900 Subject: [PATCH] zram: do not skip the first bucket A small fixup. Link: https://lkml.kernel.org/r/20241001085634.1948384-1-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Reported-by: Dan Carpenter Cc: Minchan Kim Signed-off-by: Andrew Morton --- drivers/block/zram/zram_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 623d629c6680..f57ffb920166 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -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); -- 2.50.1