Commit c4146644 authored by Li Zefan's avatar Li Zefan Committed by David S. Miller
Browse files

net: add a wrapper sk_entry()

parent 66655de6
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);