netlat: fix warnning when del netns

remove_proc_entry is remove a dentry from parent, not from the
detry itself

Reviewed-by: kernelxing <kernelxing@tencent.com>
Signed-off-by: mengensun <megnensun@tencent.com>
This commit is contained in:
mengensun 2024-05-24 16:28:28 +08:00
parent 74068984c6
commit 0db36a9c7d
1 changed files with 2 additions and 2 deletions

View File

@ -248,8 +248,8 @@ free_mbuf:
static void __net_exit net_mbuf_exit(struct net *net)
{
remove_proc_entry("log", net->mbuf.log);
remove_proc_entry("twatcher", net->mbuf.twatcher);
remove_proc_entry("log", net->mbuf.twatcher);
remove_proc_entry("twatcher", net->proc_net);
/* if mbuf allocate failed, no need to free */
if (!net->mbuf.slot)