summaryrefslogtreecommitdiffstats
path: root/net/core/sock_destructor.h
blob: 2f396e6bfba5a364727f98b160bf2fd3a3731958 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _NET_CORE_SOCK_DESTRUCTOR_H
#define _NET_CORE_SOCK_DESTRUCTOR_H
#include <net/tcp.h>

static inline bool is_skb_wmem(const struct sk_buff *skb)
{
	return skb->destructor == sock_wfree ||
	       skb->destructor == __sock_wfree ||
	       (IS_ENABLED(CONFIG_INET) && skb->destructor == tcp_wfree);
}
#endif