[patch-rt] drivers/zram: pass num_pages to zram_meta_init_table_locks()

From: Mike Galbraith
Date: Thu Oct 19 2017 - 00:27:57 EST



zram cleanup forgot to adjust passed argument when changing
zram_meta_init_table_locks() to expect page count instead
of disk size. Doing so fixes ltp inspired explosions.

Signed-off-by: Mike Galbraith <efault@xxxxxx>
---
drivers/block/zram/zram_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -819,7 +819,7 @@ static bool zram_meta_alloc(struct zram
return false;
}

- zram_meta_init_table_locks(zram, disksize);
+ zram_meta_init_table_locks(zram, num_pages);
return true;
}