diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2010-02-08 18:18:45 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-10 14:12:07 -0500 |
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 3f1a4804bb3f..c8d400063c16 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -317,6 +317,11 @@ struct sock { | |||
317 | /* | 317 | /* |
318 | * Hashed lists helper routines | 318 | * Hashed lists helper routines |
319 | */ | 319 | */ |
320 | static inline struct sock *sk_entry(const struct hlist_node *node) | ||
321 | { | ||
322 | return hlist_entry(node, struct sock, sk_node); | ||
323 | } | ||
324 | |||
320 | static inline struct sock *__sk_head(const struct hlist_head *head) | 325 | static inline struct sock *__sk_head(const struct hlist_head *head) |
321 | { | 326 | { |
322 | return hlist_entry(head->first, struct sock, sk_node); | 327 | return hlist_entry(head->first, struct sock, sk_node); |