From: Li Zefan Date: Mon, 8 Feb 2010 23:18:45 +0000 (+0000) Subject: net: add a wrapper sk_entry() X-Git-Tag: v2.6.34-rc1~233^2~401 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=c4146644a56b1f213c4c5567c75771883bec33c7;p=linux.git net: add a wrapper sk_entry() Signed-off-by: Li Zefan Signed-off-by: David S. Miller --- diff --git a/include/net/sock.h b/include/net/sock.h index 3f1a4804bb3f..c8d400063c16 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);