tcp: Add a stub for sk_defer_free_flush()
When compiling the kernel with CONFIG_INET disabled, the
sk_defer_free_flush() should be defined as a nop.
This resolves the following compilation error:
ld: net/core/sock.o: in function `sk_defer_free_flush':
./include/net/tcp.h:1378: undefined reference to `__sk_defer_free_flush'
Fixes: 79074a72d3
("net: Flush deferred skb free on socket destroy")
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20220120123440.9088-1-gal@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Родитель
cbda1b1668
Коммит
48cec899e3
|
@ -1369,6 +1369,7 @@ static inline bool tcp_checksum_complete(struct sk_buff *skb)
|
||||||
|
|
||||||
bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb);
|
bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb);
|
||||||
|
|
||||||
|
#ifdef CONFIG_INET
|
||||||
void __sk_defer_free_flush(struct sock *sk);
|
void __sk_defer_free_flush(struct sock *sk);
|
||||||
|
|
||||||
static inline void sk_defer_free_flush(struct sock *sk)
|
static inline void sk_defer_free_flush(struct sock *sk)
|
||||||
|
@ -1377,6 +1378,9 @@ static inline void sk_defer_free_flush(struct sock *sk)
|
||||||
return;
|
return;
|
||||||
__sk_defer_free_flush(sk);
|
__sk_defer_free_flush(sk);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
static inline void sk_defer_free_flush(struct sock *sk) {}
|
||||||
|
#endif
|
||||||
|
|
||||||
int tcp_filter(struct sock *sk, struct sk_buff *skb);
|
int tcp_filter(struct sock *sk, struct sk_buff *skb);
|
||||||
void tcp_set_state(struct sock *sk, int state);
|
void tcp_set_state(struct sock *sk, int state);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче