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 <gregor.beck@gmail.com>
Fixes: 602660600bcd ("fscache: initialize cookie hash table raw spinlocks")
Signed-off-by: Tom Zanussi <zanussi@kernel.org>
This commit is contained in:
Gregor Beck 2021-09-03 14:19:11 +02:00 committed by Alibek Omarov
parent 1d8902024c
commit 28729686bf
1 changed files with 1 additions and 1 deletions

View File

@ -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]);
}