hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/fs/fscache/main.c
....@@ -41,6 +41,8 @@
4141 struct workqueue_struct *fscache_object_wq;
4242 struct workqueue_struct *fscache_op_wq;
4343
44
+DEFINE_PER_CPU(wait_queue_head_t, fscache_object_cong_wait);
45
+
4446 /* these values serve as lower bounds, will be adjusted in fscache_init() */
4547 static unsigned fscache_object_max_active = 4;
4648 static unsigned fscache_op_max_active = 2;
....@@ -136,6 +138,7 @@
136138 static int __init fscache_init(void)
137139 {
138140 unsigned int nr_cpus = num_possible_cpus();
141
+ unsigned int cpu;
139142 int ret;
140143
141144 fscache_object_max_active =
....@@ -158,6 +161,9 @@
158161 if (!fscache_op_wq)
159162 goto error_op_wq;
160163
164
+ for_each_possible_cpu(cpu)
165
+ init_waitqueue_head(&per_cpu(fscache_object_cong_wait, cpu));
166
+
161167 ret = fscache_proc_init();
162168 if (ret < 0)
163169 goto error_proc;