2020-01-03 23:36:11 +00:00
|
|
|
From d80bf465170b4bf24223d8015c2c604bfbea67ab Mon Sep 17 00:00:00 2001
|
2018-08-27 14:32:32 +00:00
|
|
|
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
|
|
Date: Wed, 13 Sep 2017 12:32:34 +0200
|
2020-01-03 23:36:11 +00:00
|
|
|
Subject: [PATCH 172/291] fs/dcache: bring back explicit INIT_HLIST_BL_HEAD
|
2019-04-08 23:49:20 +00:00
|
|
|
init
|
2020-01-03 23:36:11 +00:00
|
|
|
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.90-rt35.tar.xz
|
2018-08-27 14:32:32 +00:00
|
|
|
|
|
|
|
Commit 3d375d78593c ("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>
|
|
|
|
---
|
2019-04-08 23:49:20 +00:00
|
|
|
fs/dcache.c | 11 +++++++++++
|
2018-08-27 14:32:32 +00:00
|
|
|
1 file changed, 11 insertions(+)
|
|
|
|
|
2019-04-08 23:49:20 +00:00
|
|
|
diff --git a/fs/dcache.c b/fs/dcache.c
|
2019-08-18 21:33:52 +00:00
|
|
|
index 6e0022326afe..10225a9135fb 100644
|
2018-08-27 14:32:32 +00:00
|
|
|
--- a/fs/dcache.c
|
|
|
|
+++ b/fs/dcache.c
|
2019-08-18 21:33:52 +00:00
|
|
|
@@ -3060,6 +3060,8 @@ __setup("dhash_entries=", set_dhash_entries);
|
2018-08-27 14:32:32 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
*/
|
2019-08-18 21:33:52 +00:00
|
|
|
@@ -3076,11 +3078,16 @@ static void __init dcache_init_early(void)
|
2018-08-27 14:32:32 +00:00
|
|
|
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
|
2019-08-18 21:33:52 +00:00
|
|
|
@@ -3104,6 +3111,10 @@ static void __init dcache_init(void)
|
2018-08-27 14:32:32 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2020-01-03 23:36:11 +00:00
|
|
|
--
|
|
|
|
2.24.0
|
|
|
|
|