|
@@ -159,7 +159,11 @@ int gen_new_estimator(struct gnet_stats_basic_packed *bstats,
|
|
est->intvl_log = intvl_log;
|
|
est->intvl_log = intvl_log;
|
|
est->cpu_bstats = cpu_bstats;
|
|
est->cpu_bstats = cpu_bstats;
|
|
|
|
|
|
|
|
+ if (stats_lock)
|
|
|
|
+ local_bh_disable();
|
|
est_fetch_counters(est, &b);
|
|
est_fetch_counters(est, &b);
|
|
|
|
+ if (stats_lock)
|
|
|
|
+ local_bh_enable();
|
|
est->last_bytes = b.bytes;
|
|
est->last_bytes = b.bytes;
|
|
est->last_packets = b.packets;
|
|
est->last_packets = b.packets;
|
|
old = rcu_dereference_protected(*rate_est, 1);
|
|
old = rcu_dereference_protected(*rate_est, 1);
|