]> Pileus Git - ~andy/linux/blobdiff - net/ipv6/ip6_offload.c
ipv6: gso: remove redundant locking
[~andy/linux] / net / ipv6 / ip6_offload.c
index d82de72281009c1b93d1cbde1bac91c023ecd930..b405fba91c720989c6153de548c467856f2d51f2 100644 (file)
@@ -66,7 +66,6 @@ static int ipv6_gso_send_check(struct sk_buff *skb)
        __skb_pull(skb, sizeof(*ipv6h));
        err = -EPROTONOSUPPORT;
 
-       rcu_read_lock();
        ops = rcu_dereference(inet6_offloads[
                ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr)]);
 
@@ -74,7 +73,6 @@ static int ipv6_gso_send_check(struct sk_buff *skb)
                skb_reset_transport_header(skb);
                err = ops->callbacks.gso_send_check(skb);
        }
-       rcu_read_unlock();
 
 out:
        return err;
@@ -113,13 +111,12 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb,
        segs = ERR_PTR(-EPROTONOSUPPORT);
 
        proto = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr);
-       rcu_read_lock();
+
        ops = rcu_dereference(inet6_offloads[proto]);
        if (likely(ops && ops->callbacks.gso_segment)) {
                skb_reset_transport_header(skb);
                segs = ops->callbacks.gso_segment(skb, features);
        }
-       rcu_read_unlock();
 
        if (IS_ERR(segs))
                goto out;