On Mon, 2016-04-25 at 10:42 -0400, Craig Gallek wrote:
> From: Craig Gallek <kr...@google.com>
...
>  static inline void __sk_nulls_add_node_rcu(struct sock *sk, struct 
> hlist_nulls_head *list)
> diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
> index fcadb670f50b..b76b0d7e59c1 100644
> --- a/net/ipv4/inet_hashtables.c
> +++ b/net/ipv4/inet_hashtables.c
> @@ -479,7 +479,11 @@ int __inet_hash(struct sock *sk, struct sock *osk,
>               if (err)
>                       goto unlock;
>       }
> -     hlist_add_head_rcu(&sk->sk_node, &ilb->head);
> +     if (IS_ENABLED(CONFIG_IPV6) && sk->sk_reuseport &&
> +             sk->sk_family == AF_INET6)

Nit : alignment was wrong here.

cond1 & cond2 should be aligned as in :

if (cond1 &&
    cond2)


> +             hlist_add_tail_rcu(&sk->sk_node, &ilb->head);
> +     else
> +             hlist_add_head_rcu(&sk->sk_node, &ilb->head);
>       sock_set_flag(sk, SOCK_RCU_FREE);
>       sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1);
>  unlock:


Reply via email to