]> git.baikalelectronics.ru Git - kernel.git/commit
netns: move {inc,dec}_net_namespaces into #ifdef
authorArnd Bergmann <arnd@arndb.de>
Fri, 23 Sep 2016 16:06:12 +0000 (18:06 +0200)
committerEric W. Biederman <ebiederm@xmission.com>
Fri, 23 Sep 2016 18:39:43 +0000 (13:39 -0500)
commit4443edf6a86885d4d71a47295c6631bf08e55ef3
tree5af38ce57575d8353dc1313957f97c96c2fb972c
parent110bdabfa180b0b242374a9783ee6b118b715cdf
netns: move {inc,dec}_net_namespaces into #ifdef

With the newly enforced limit on the number of namespaces,
we get a build warning if CONFIG_NETNS is disabled:

net/core/net_namespace.c:273:13: error: 'dec_net_namespaces' defined but not used [-Werror=unused-function]
net/core/net_namespace.c:268:24: error: 'inc_net_namespaces' defined but not used [-Werror=unused-function]

This moves the two added functions inside the #ifdef that guards
their callers.

Fixes: 07ff6d23a988 ("netns: Add a limit on the number of net namespaces")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
net/core/net_namespace.c