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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Gregor Beck <gbeck@xxxxxxxxxxxxxxxxxxxxx>

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@xxxxxxxxx>
Fixes: 602660600bcd ("fscache: initialize cookie hash table raw spinlocks")
Signed-off-by: Tom Zanussi <zanussi@xxxxxxxxxx>
---
 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 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]);
 }
-- 
2.17.1




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux