]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/net/inet_hashtables.h
mm, THP, swap: move anonymous THP split logic to vmscan
[karo-tx-linux.git] / include / net / inet_hashtables.h
index 1178931288cbfc4d32ef5868ec11d98b2ba8df7d..5026b1f08bb87bf7b9be9df84d70fedf2bd8707f 100644 (file)
@@ -32,7 +32,7 @@
 #include <net/tcp_states.h>
 #include <net/netns/hash.h>
 
-#include <linux/atomic.h>
+#include <linux/refcount.h>
 #include <asm/byteorder.h>
 
 /* This is for all connections with a full identity, no wildcards.
@@ -334,7 +334,7 @@ static inline struct sock *inet_lookup(struct net *net,
        sk = __inet_lookup(net, hashinfo, skb, doff, saddr, sport, daddr,
                           dport, dif, &refcounted);
 
-       if (sk && !refcounted && !atomic_inc_not_zero(&sk->sk_refcnt))
+       if (sk && !refcounted && !refcount_inc_not_zero(&sk->sk_refcnt))
                sk = NULL;
        return sk;
 }
@@ -359,7 +359,6 @@ static inline struct sock *__inet_lookup_skb(struct inet_hashinfo *hashinfo,
                             refcounted);
 }
 
-u32 sk_ehashfn(const struct sock *sk);
 u32 inet6_ehashfn(const struct net *net,
                  const struct in6_addr *laddr, const u16 lport,
                  const struct in6_addr *faddr, const __be16 fport);