Skip to content

Commit

Permalink
nfs client: exit_net cleanup check added
Browse files Browse the repository at this point in the history
Be sure that nfs_client_list and nfs_volume_list lists initialized
in net_init hook were return to initial state in net_exit hook.

Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
  • Loading branch information
Vasily Averin authored and Anna Schumaker committed Nov 17, 2017
1 parent 0671d8f commit b0b5352
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2084,8 +2084,12 @@ static int nfs_net_init(struct net *net)

static void nfs_net_exit(struct net *net)
{
struct nfs_net *nn = net_generic(net, nfs_net_id);

nfs_fs_proc_net_exit(net);
nfs_cleanup_cb_ident_idr(net);
WARN_ON_ONCE(!list_empty(&nn->nfs_client_list));
WARN_ON_ONCE(!list_empty(&nn->nfs_volume_list));
}

static struct pernet_operations nfs_net_ops = {
Expand Down

0 comments on commit b0b5352

Please sign in to comment.