Skip to content

Commit b0b5352

Browse files
vaverinamschuma-ntap
authored andcommitted
nfs client: exit_net cleanup check added
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>
1 parent 0671d8f commit b0b5352

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/nfs/inode.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2084,8 +2084,12 @@ static int nfs_net_init(struct net *net)
20842084

20852085
static void nfs_net_exit(struct net *net)
20862086
{
2087+
struct nfs_net *nn = net_generic(net, nfs_net_id);
2088+
20872089
nfs_fs_proc_net_exit(net);
20882090
nfs_cleanup_cb_ident_idr(net);
2091+
WARN_ON_ONCE(!list_empty(&nn->nfs_client_list));
2092+
WARN_ON_ONCE(!list_empty(&nn->nfs_volume_list));
20892093
}
20902094

20912095
static struct pernet_operations nfs_net_ops = {

0 commit comments

Comments
 (0)