From 28729686bf412fc91327b3b21709cfe720d36de8 Mon Sep 17 00:00:00 2001 From: Gregor Beck Date: Fri, 3 Sep 2021 14:19:11 +0200 Subject: [PATCH] fscache: fix initialisation of cookie hash table raw spinlocks The original patch, 602660600bcd ("fscache: initialize cookie hash table raw spinlocks"), subtracted 1 from the shift and so still left some spinlocks uninitialized. This fixes that. [zanussi: Added changelog text] Signed-off-by: Gregor Beck Fixes: 602660600bcd ("fscache: initialize cookie hash table raw spinlocks") Signed-off-by: Tom Zanussi --- fs/fscache/cookie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fscache/cookie.c b/fs/fscache/cookie.c index 3cc20980950d..7446043d14fa 100644 --- a/fs/fscache/cookie.c +++ b/fs/fscache/cookie.c @@ -951,6 +951,6 @@ void __init fscache_cookie_init(void) { int i; - for (i = 0; i < (1 << fscache_cookie_hash_shift) - 1; i++) + for (i = 0; i < ARRAY_SIZE(fscache_cookie_hash); i++) INIT_HLIST_BL_HEAD(&fscache_cookie_hash[i]); }