Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sock: Hide unused variable when !CONFIG_PROC_FS.

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>

authored by

Tonghao Zhang and committed by
David S. Miller
398b841e 648845ab

+1 -1
+1 -1
include/net/netns/core.h
··· 13 13 14 14 #ifdef CONFIG_PROC_FS 15 15 int __percpu *sock_inuse; 16 - #endif 17 16 struct prot_inuse __percpu *prot_inuse; 17 + #endif 18 18 }; 19 19 20 20 #endif