]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
net: use this_cpu_ptr()
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 24 Jun 2010 00:52:37 +0000 (00:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Jun 2010 06:24:29 +0000 (23:24 -0700)
use this_cpu_ptr(p) instead of per_cpu_ptr(p, smp_processor_id())

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/flow.c
net/ipv4/ip_input.c
net/ipv4/tcp.c

index 161900674009d832752a2b3929586b53522f064f..8c7c91a32f182b0fc6e1e0f59b766e4fb8169693 100644 (file)
@@ -222,7 +222,7 @@ flow_cache_lookup(struct net *net, struct flowi *key, u16 family, u8 dir,
        unsigned int hash;
 
        local_bh_disable();
-       fcp = per_cpu_ptr(fc->percpu, smp_processor_id());
+       fcp = this_cpu_ptr(fc->percpu);
 
        fle = NULL;
        flo = NULL;
@@ -302,7 +302,7 @@ static void flow_cache_flush_tasklet(unsigned long data)
        LIST_HEAD(gc_list);
        int i, deleted = 0;
 
-       fcp = per_cpu_ptr(fc->percpu, smp_processor_id());
+       fcp = this_cpu_ptr(fc->percpu);
        for (i = 0; i < flow_cache_hash_size(fc); i++) {
                hlist_for_each_entry_safe(fle, entry, tmp,
                                          &fcp->hash_table[i], u.hlist) {
index db47a5a00ed2239a28bc19947ae6bbe95fe396cb..d859bcc26cb7e568b60261e8a0703add32a92798 100644 (file)
@@ -342,7 +342,7 @@ static int ip_rcv_finish(struct sk_buff *skb)
 
 #ifdef CONFIG_NET_CLS_ROUTE
        if (unlikely(skb_dst(skb)->tclassid)) {
-               struct ip_rt_acct *st = per_cpu_ptr(ip_rt_acct, smp_processor_id());
+               struct ip_rt_acct *st = this_cpu_ptr(ip_rt_acct);
                u32 idx = skb_dst(skb)->tclassid;
                st[idx&0xFF].o_packets++;
                st[idx&0xFF].o_bytes += skb->len;
index d5f84bd5a45508df46871ed52be1e36aa26157ad..4e6ddfbab09eb86dce78c7c173b632f936f9d5a8 100644 (file)
@@ -2962,7 +2962,7 @@ struct tcp_md5sig_pool *tcp_get_md5sig_pool(void)
        spin_unlock(&tcp_md5sig_pool_lock);
 
        if (p)
-               return *per_cpu_ptr(p, smp_processor_id());
+               return *this_cpu_ptr(p);
 
        local_bh_enable();
        return NULL;