UPSTREAM: ARM: rockchip: add support smp for rk3036
[firefly-linux-kernel-4.4.55.git] / include / net / ip_tunnels.h
index f6dafec9102c5f03e08fdd7fc3efc4812e4137ce..62a750a6a8f8cb32c9eb5d8d160aa94a20898473 100644 (file)
@@ -287,12 +287,13 @@ static inline void iptunnel_xmit_stats(int err,
                                       struct pcpu_sw_netstats __percpu *stats)
 {
        if (err > 0) {
-               struct pcpu_sw_netstats *tstats = this_cpu_ptr(stats);
+               struct pcpu_sw_netstats *tstats = get_cpu_ptr(stats);
 
                u64_stats_update_begin(&tstats->syncp);
                tstats->tx_bytes += err;
                tstats->tx_packets++;
                u64_stats_update_end(&tstats->syncp);
+               put_cpu_ptr(tstats);
        } else if (err < 0) {
                err_stats->tx_errors++;
                err_stats->tx_aborted_errors++;