diff mbox series

[RT,2/3] fscache: fix initialisation of cookie hash table raw spinlocks

Message ID b0d883b82b275ffe9aa0c9e3ca7960377e78c06e.1631027711.git.zanussi@kernel.org
State New
Headers show
Series Linux v5.4.143-rt64-rc2 | expand

Commit Message

Tom Zanussi Sept. 7, 2021, 3:15 p.m. UTC
From: Gregor Beck <gbeck@esigma-technology.com>

v5.4.143-rt64-rc2 stable review patch.
If anyone has any objections, please let me know.

-----------


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 <gregor.beck@gmail.com>
Fixes: 602660600bcd ("fscache: initialize cookie hash table raw spinlocks")
Signed-off-by: Tom Zanussi <zanussi@kernel.org>
---
 fs/fscache/cookie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/fscache/cookie.c b/fs/fscache/cookie.c
index 5508d92e3f8f..cba2a226897f 100644
--- a/fs/fscache/cookie.c
+++ b/fs/fscache/cookie.c
@@ -963,6 +963,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]);
 }