summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0337-fscache-fix-initialisation-of-cookie-hash-table-raw-.patch
blob: 08e69333a39ff23513a0613b3bd09146b75748da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From: Gregor Beck <gbeck@esigma-technology.com>
Date: Fri, 3 Sep 2021 14:19:11 +0200
Subject: [PATCH 337/354] fscache: fix initialisation of cookie hash table raw
 spinlocks
Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=80b208b075589fc2eaad9f86e735c248b34a65b6

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>
(cherry picked from commit 2cdede918a7b5f2b367e4839ad021e1d3b2479b1)
Signed-off-by: Clark Williams <williams@redhat.com>
---
 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 b2b9a85a4ba5..84e57196a293 100644
--- a/fs/fscache/cookie.c
+++ b/fs/fscache/cookie.c
@@ -955,6 +955,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]);
 }