Patchworkβ [02/13] net: add a wrapper sk_entry()

login
register
about
Submitter Li Zefan
Date 2010-02-09 09:18:45
Message ID <4B712875.2080309@cn.fujitsu.com>
Download mbox | patch
Permalink /patch/44883/
State Accepted
Delegated to: David Miller
Headers show

Comments

Li Zefan - 2010-02-09 09:18:45
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 include/net/sock.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Patch

diff --git a/include/net/sock.h b/include/net/sock.h
index 3f1a480..c8d4000 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);