net: net_namespace: Optimize the code
authorYajun Deng <yajun.deng@linux.dev>
Tue, 17 Aug 2021 15:23:00 +0000 (23:23 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Aug 2021 09:34:48 +0000 (10:34 +0100)
commit41467d2ff4dfe1837cbb0f45e2088e6e787580c6
tree5ed1faf91f5d7ff9b9c897fb719eab66c7503533
parent994d2cbb08ca05e3c1af954ec63a3ae32a862ac5
net: net_namespace: Optimize the code

There is only one caller for ops_free(), so inline it.
Separate net_drop_ns() and net_free(), so the net_free()
can be called directly.
Add free_exit_list() helper function for free net_exit_list.

====================
v2:
 - v1 does not apply, rebase it.
====================

Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/net_namespace.c