diff options
author | Vasily Averin <vvs@virtuozzo.com> | 2017-11-06 16:23:24 +0300 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2017-11-27 16:45:10 -0500 |
commit | a3152f1440c762128a626d90718ba6535c81c1b4 (patch) | |
tree | b9479ae1bddeec6d78fc7536c53a756cb9b1f646 /fs/lockd/svc.c | |
parent | b872285751c1af010e12d02bce7069e2061a58ca (diff) | |
download | linux-a3152f1440c762128a626d90718ba6535c81c1b4.tar.bz2 |
lockd: added cleanup checks in exit_net hook
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/lockd/svc.c')
-rw-r--r-- | fs/lockd/svc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index e28796bd7375..cb659ef789c0 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -677,6 +677,17 @@ static int lockd_init_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 = { |