mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-23 02:54:32 +08:00
398b841e4a
When CONFIG_PROC_FS is disabled, we will not use the prot_inuse counter. This adds an #ifdef to hide the variable definition in that case. This is not a bugfix. But we can save bytes when there are many network namespace. Cc: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: Martin Zhang <zhangjunweimartin@didichuxing.com> Signed-off-by: Tonghao Zhang <zhangtonghao@didichuxing.com> Signed-off-by: David S. Miller <davem@davemloft.net>
21 lines
346 B
C
21 lines
346 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __NETNS_CORE_H__
|
|
#define __NETNS_CORE_H__
|
|
|
|
struct ctl_table_header;
|
|
struct prot_inuse;
|
|
|
|
struct netns_core {
|
|
/* core sysctls */
|
|
struct ctl_table_header *sysctl_hdr;
|
|
|
|
int sysctl_somaxconn;
|
|
|
|
#ifdef CONFIG_PROC_FS
|
|
int __percpu *sock_inuse;
|
|
struct prot_inuse __percpu *prot_inuse;
|
|
#endif
|
|
};
|
|
|
|
#endif
|