• Arnd Bergmann's avatar
    netns: move {inc,dec}_net_namespaces into #ifdef · 2ed6afde
    Arnd Bergmann authored
    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: 70328660 ("netns: Add a limit on the number of net namespaces")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
    2ed6afde
net_namespace.c 23.3 KB