]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/ipv6/udp.c
[UDP]: Place file operations directly into udp_seq_afinfo.
[mv-sheeva.git] / net / ipv6 / udp.c
index 6683c04b427ed1cf4264c48679ca72154aa7db4c..ff8d53ecdd60212c10bf0aa2d9d4618a448da9b8 100644 (file)
@@ -70,7 +70,7 @@ static struct sock *__udp6_lib_lookup(struct net *net,
        sk_for_each(sk, node, &udptable[hnum & (UDP_HTABLE_SIZE - 1)]) {
                struct inet_sock *inet = inet_sk(sk);
 
-               if (sk->sk_net == net && sk->sk_hash == hnum &&
+               if (net_eq(sock_net(sk), net) && sk->sk_hash == hnum &&
                                sk->sk_family == PF_INET6) {
                        struct ipv6_pinfo *np = inet6_sk(sk);
                        int score = 0;
@@ -323,7 +323,7 @@ static struct sock *udp_v6_mcast_next(struct sock *sk,
        sk_for_each_from(s, node) {
                struct inet_sock *inet = inet_sk(s);
 
-               if (s->sk_net != sk->sk_net)
+               if (sock_net(s) != sock_net(sk))
                        continue;
 
                if (s->sk_hash == num && s->sk_family == PF_INET6) {
@@ -977,14 +977,14 @@ int udp6_seq_show(struct seq_file *seq, void *v)
        return 0;
 }
 
-static struct file_operations udp6_seq_fops;
 static struct udp_seq_afinfo udp6_seq_afinfo = {
        .owner          = THIS_MODULE,
        .name           = "udp6",
        .family         = AF_INET6,
        .hashtable      = udp_hash,
-       .seq_show       = udp6_seq_show,
-       .seq_fops       = &udp6_seq_fops,
+       .seq_ops        = {
+               .show           = udp6_seq_show,
+       },
 };
 
 int udp6_proc_init(struct net *net)
@@ -999,8 +999,6 @@ void udp6_proc_exit(struct net *net) {
 
 /* ------------------------------------------------------------------------ */
 
-DEFINE_PROTO_INUSE(udpv6)
-
 struct proto udpv6_prot = {
        .name              = "UDPv6",
        .owner             = THIS_MODULE,
@@ -1027,7 +1025,6 @@ struct proto udpv6_prot = {
        .compat_setsockopt = compat_udpv6_setsockopt,
        .compat_getsockopt = compat_udpv6_getsockopt,
 #endif
-       REF_PROTO_INUSE(udpv6)
 };
 
 static struct inet_protosw udpv6_protosw = {