fs/dcache: bring back explicit INIT_HLIST_BL_HEAD init
Commit 3d375d7859
("mm: update callers to use HASH_ZERO flag") removed
INIT_HLIST_BL_HEAD and uses the ZERO flag instead for the init. However
on RT we have also a spinlock which needs an init call so we can't use
that.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
This commit is contained in:
parent
b0408fdcf9
commit
e852fda5d8
11
fs/dcache.c
11
fs/dcache.c
@ -3143,6 +3143,8 @@ __setup("dhash_entries=", set_dhash_entries);
|
||||
|
||||
static void __init dcache_init_early(void)
|
||||
{
|
||||
unsigned int loop;
|
||||
|
||||
/* If hashes are distributed across NUMA nodes, defer
|
||||
* hash allocation until vmalloc space is available.
|
||||
*/
|
||||
@ -3159,11 +3161,16 @@ static void __init dcache_init_early(void)
|
||||
NULL,
|
||||
0,
|
||||
0);
|
||||
|
||||
for (loop = 0; loop < (1U << d_hash_shift); loop++)
|
||||
INIT_HLIST_BL_HEAD(dentry_hashtable + loop);
|
||||
|
||||
d_hash_shift = 32 - d_hash_shift;
|
||||
}
|
||||
|
||||
static void __init dcache_init(void)
|
||||
{
|
||||
unsigned int loop;
|
||||
/*
|
||||
* A constructor could be added for stable state like the lists,
|
||||
* but it is probably not worth it because of the cache nature
|
||||
@ -3187,6 +3194,10 @@ static void __init dcache_init(void)
|
||||
NULL,
|
||||
0,
|
||||
0);
|
||||
|
||||
for (loop = 0; loop < (1U << d_hash_shift); loop++)
|
||||
INIT_HLIST_BL_HEAD(dentry_hashtable + loop);
|
||||
|
||||
d_hash_shift = 32 - d_hash_shift;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user