]> Pileus Git - ~andy/linux/blobdiff - drivers/net/team/team_mode_loadbalance.c
net: Explicitly initialize u64_stats_sync structures for lockdep
[~andy/linux] / drivers / net / team / team_mode_loadbalance.c
index 829a9cd2b4dac5257f2deb8eabd39c0210ffc8bc..d671fc3ac5ac26ad2b7666617fab5adc1042e569 100644 (file)
@@ -570,7 +570,7 @@ static int lb_init(struct team *team)
 {
        struct lb_priv *lb_priv = get_lb_priv(team);
        lb_select_tx_port_func_t *func;
-       int err;
+       int i, err;
 
        /* set default tx port selector */
        func = lb_select_tx_port_get_func("hash");
@@ -588,6 +588,13 @@ static int lb_init(struct team *team)
                goto err_alloc_pcpu_stats;
        }
 
+       for_each_possible_cpu(i) {
+               struct lb_pcpu_stats *team_lb_stats;
+               team_lb_stats = per_cpu_ptr(lb_priv->pcpu_stats, i);
+               u64_stats_init(&team_lb_stats->syncp);
+       }
+
+
        INIT_DELAYED_WORK(&lb_priv->ex->stats.refresh_dw, lb_stats_refresh);
 
        err = team_options_register(team, lb_options, ARRAY_SIZE(lb_options));