diff options
author | Changbin Du <changbin.du@gmail.com> | 2021-06-15 02:52:43 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-15 21:00:45 +0300 |
commit | e34492dea68d4f09e9989e518fc76cd41909d707 (patch) | |
tree | cae070915005e908eec0eefdbff2da1080ad06f1 /net | |
parent | 475b92f932168a78da8109acd10bfb7578b8f2bb (diff) | |
download | linux-e34492dea68d4f09e9989e518fc76cd41909d707.tar.xz |
net: inline function get_net_ns_by_fd if NET_NS is disabled
The function get_net_ns_by_fd() could be inlined when NET_NS is not
enabled.
Signed-off-by: Changbin Du <changbin.du@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/net_namespace.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index cc8dafb25d61..9b5a767eddd5 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c @@ -672,14 +672,8 @@ struct net *get_net_ns_by_fd(int fd) fput(file); return net; } - -#else -struct net *get_net_ns_by_fd(int fd) -{ - return ERR_PTR(-EINVAL); -} -#endif EXPORT_SYMBOL_GPL(get_net_ns_by_fd); +#endif struct net *get_net_ns_by_pid(pid_t pid) { |