diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-06-28 11:10:39 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-07-06 14:54:52 -0400 |
commit | 28ade856c0f724b1d74d7d683ec2dc0e98de60ae (patch) | |
tree | 3e11f9bfaf379cd3320d643acbff6491aaaaa9f4 /fs/nfs/client.c | |
parent | 02a2779f223e9f77c114b0c64ca246b01c1dc563 (diff) | |
parent | bf11fbdb20b385157b046ea7781f04d0c62554a3 (diff) | |
download | linux-28ade856c0f724b1d74d7d683ec2dc0e98de60ae.tar.bz2 |
Merge branch 'containers'
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r-- | fs/nfs/client.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index d7e4f0848e28..6e7aeb543f6a 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -49,6 +49,7 @@ #include "pnfs.h" #include "nfs.h" #include "netns.h" +#include "sysfs.h" #define NFSDBG_FACILITY NFSDBG_CLIENT @@ -192,7 +193,7 @@ error_0: EXPORT_SYMBOL_GPL(nfs_alloc_client); #if IS_ENABLED(CONFIG_NFS_V4) -void nfs_cleanup_cb_ident_idr(struct net *net) +static void nfs_cleanup_cb_ident_idr(struct net *net) { struct nfs_net *nn = net_generic(net, nfs_net_id); @@ -214,7 +215,7 @@ static void pnfs_init_server(struct nfs_server *server) } #else -void nfs_cleanup_cb_ident_idr(struct net *net) +static void nfs_cleanup_cb_ident_idr(struct net *net) { } @@ -1072,6 +1073,18 @@ void nfs_clients_init(struct net *net) #endif spin_lock_init(&nn->nfs_client_lock); nn->boot_time = ktime_get_real(); + + nfs_netns_sysfs_setup(nn, net); +} + +void nfs_clients_exit(struct net *net) +{ + struct nfs_net *nn = net_generic(net, nfs_net_id); + + nfs_netns_sysfs_destroy(nn); + nfs_cleanup_cb_ident_idr(net); + WARN_ON_ONCE(!list_empty(&nn->nfs_client_list)); + WARN_ON_ONCE(!list_empty(&nn->nfs_volume_list)); } #ifdef CONFIG_PROC_FS |