*/
static void init_data_structures_once(void)
{
- static bool initialization_happened;
+ static bool ds_initialized, rcu_head_initialized;
int i;
- if (likely(initialization_happened))
+ if (likely(rcu_head_initialized))
return;
- initialization_happened = true;
+ if (system_state >= SYSTEM_SCHEDULING) {
+ init_rcu_head(&delayed_free.rcu_head);
+ rcu_head_initialized = true;
+ }
+
+ if (ds_initialized)
+ return;
+
+ ds_initialized = true;
- init_rcu_head(&delayed_free.rcu_head);
INIT_LIST_HEAD(&delayed_free.pf[0].zapped);
INIT_LIST_HEAD(&delayed_free.pf[1].zapped);