diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2010-02-08 23:18:45 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-10 11:12:07 -0800 |
commit | c4146644a56b1f213c4c5567c75771883bec33c7 (patch) | |
tree | be9a92ed6f16d0517d7d19382921adeacd87a065 /include/net/sock.h | |
parent | 66655de6d132b726be64c324bc3f9ea366d20697 (diff) |
net: add a wrapper sk_entry()
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 5 |
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); |