]> git.hungrycats.org Git - linux/commitdiff
[NET]: Another cleanup in netif_receive_skb()
authorStephen Hemminger <shemminger@osdl.org>
Tue, 24 Aug 2004 10:10:20 +0000 (03:10 -0700)
committerDavid S. Miller <davem@nuts.davemloft.net>
Tue, 24 Aug 2004 10:10:20 +0000 (03:10 -0700)
Move rcu_read_lock up a little, since it needs to be
done in both branches anyway. Also whitespace fix.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@redhat.com>
net/core/dev.c

index e16ebfdd5e9ac2573e603942111ba5e021ad048f..f26ec60386529f6a3d28fe59aca5eb805e9d4d64 100644 (file)
@@ -1773,15 +1773,16 @@ int netif_receive_skb(struct sk_buff *skb)
        skb->mac_len = skb->nh.raw - skb->mac.raw;
 
        pt_prev = NULL;
+
+       rcu_read_lock();
+
 #ifdef CONFIG_NET_CLS_ACT
        if (skb->tc_verd & TC_NCLS) {
                skb->tc_verd = CLR_TC_NCLS(skb->tc_verd);
-               rcu_read_lock();
                goto ncls;
        }
- #endif
+#endif
 
-       rcu_read_lock();
        list_for_each_entry_rcu(ptype, &ptype_all, list) {
                if (!ptype->dev || ptype->dev == skb->dev) {
                        if (pt_prev)