aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2010-02-08 23:18:45 +0000
committerDavid S. Miller <davem@davemloft.net>2010-02-10 11:12:07 -0800
commitc4146644a56b1f213c4c5567c75771883bec33c7 (patch)
treebe9a92ed6f16d0517d7d19382921adeacd87a065
parent66655de6d132b726be64c324bc3f9ea366d20697 (diff)
downloadvexpress-lsk-c4146644a56b1f213c4c5567c75771883bec33c7.tar.gz
net: add a wrapper sk_entry()
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/sock.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 3f1a4804bb3..c8d400063c1 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -317,6 +317,11 @@ struct sock {
/*
* Hashed lists helper routines
*/
+static inline struct sock *sk_entry(const struct hlist_node *node)
+{
+ return hlist_entry(node, struct sock, sk_node);
+}
+
static inline struct sock *__sk_head(const struct hlist_head *head)
{
return hlist_entry(head->first, struct sock, sk_node);