提交 a3152f14 编写于 作者: V Vasily Averin 提交者: J. Bruce Fields

lockd: added cleanup checks in exit_net hook

Signed-off-by: NVasily Averin <vvs@virtuozzo.com>
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
上级 b8722857
...@@ -677,6 +677,17 @@ static int lockd_init_net(struct net *net) ...@@ -677,6 +677,17 @@ static int lockd_init_net(struct net *net)
static void lockd_exit_net(struct net *net) static void lockd_exit_net(struct net *net)
{ {
struct lockd_net *ln = net_generic(net, lockd_net_id);
WARN_ONCE(!list_empty(&ln->lockd_manager.list),
"net %x %s: lockd_manager.list is not empty\n",
net->ns.inum, __func__);
WARN_ONCE(!list_empty(&ln->nsm_handles),
"net %x %s: nsm_handles list is not empty\n",
net->ns.inum, __func__);
WARN_ONCE(delayed_work_pending(&ln->grace_period_end),
"net %x %s: grace_period_end was not cancelled\n",
net->ns.inum, __func__);
} }
static struct pernet_operations lockd_net_ops = { static struct pernet_operations lockd_net_ops = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册