[PATCH] zram: do not skip the first bucket

From: Sergey Senozhatsky
Date: Tue Oct 01 2024 - 04:56:52 EST


A small fixup.

Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Signed-off-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>
---
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 d3329a67e805..263795c4aef7 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.46.1.824.gd892dcdcdd-goog