aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfsd/nfs4state.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index bc2fc9f076fc..84a27a24b806 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -4829,7 +4829,7 @@ err:
4829} 4829}
4830 4830
4831static void 4831static void
4832__nfs4_state_shutdown_net(struct net *net) 4832nfs4_state_destroy_net(struct net *net)
4833{ 4833{
4834 int i; 4834 int i;
4835 struct nfs4_client *clp = NULL; 4835 struct nfs4_client *clp = NULL;
@@ -4857,6 +4857,7 @@ __nfs4_state_shutdown_net(struct net *net)
4857 kfree(nn->ownerstr_hashtbl); 4857 kfree(nn->ownerstr_hashtbl);
4858 kfree(nn->unconf_id_hashtbl); 4858 kfree(nn->unconf_id_hashtbl);
4859 kfree(nn->conf_id_hashtbl); 4859 kfree(nn->conf_id_hashtbl);
4860 put_net(net);
4860} 4861}
4861 4862
4862/* initialization to perform when the nfsd service is started: */ 4863/* initialization to perform when the nfsd service is started: */
@@ -4906,19 +4907,20 @@ out_free_laundry:
4906 destroy_workqueue(laundry_wq); 4907 destroy_workqueue(laundry_wq);
4907out_recovery: 4908out_recovery:
4908 nfsd4_client_tracking_exit(net); 4909 nfsd4_client_tracking_exit(net);
4909 __nfs4_state_shutdown_net(net); 4910 nfs4_state_destroy_net(net);
4910 put_net(net);
4911 return ret; 4911 return ret;
4912} 4912}
4913 4913
4914/* should be called with the state lock held */ 4914/* should be called with the state lock held */
4915static void 4915static void
4916__nfs4_state_shutdown(struct net *net) 4916nfs4_state_shutdown_net(struct net *net)
4917{ 4917{
4918 struct nfs4_delegation *dp = NULL; 4918 struct nfs4_delegation *dp = NULL;
4919 struct list_head *pos, *next, reaplist; 4919 struct list_head *pos, *next, reaplist;
4920 struct nfsd_net *nn = net_generic(net, nfsd_net_id);
4920 4921
4921 __nfs4_state_shutdown_net(net); 4922 cancel_delayed_work_sync(&nn->laundromat_work);
4923 locks_end_grace(&nn->nfsd4_manager);
4922 4924
4923 INIT_LIST_HEAD(&reaplist); 4925 INIT_LIST_HEAD(&reaplist);
4924 spin_lock(&recall_lock); 4926 spin_lock(&recall_lock);
@@ -4935,19 +4937,16 @@ __nfs4_state_shutdown(struct net *net)
4935 } 4937 }
4936 4938
4937 nfsd4_client_tracking_exit(net); 4939 nfsd4_client_tracking_exit(net);
4938 put_net(net); 4940 nfs4_state_destroy_net(net);
4939} 4941}
4940 4942
4941void 4943void
4942nfs4_state_shutdown(void) 4944nfs4_state_shutdown(void)
4943{ 4945{
4944 struct net *net = &init_net; 4946 struct net *net = &init_net;
4945 struct nfsd_net *nn = net_generic(net, nfsd_net_id);
4946 4947
4947 cancel_delayed_work_sync(&nn->laundromat_work); 4948 nfs4_state_shutdown_net(net);
4948 destroy_workqueue(laundry_wq); 4949 destroy_workqueue(laundry_wq);
4949 locks_end_grace(&nn->nfsd4_manager);
4950 __nfs4_state_shutdown(net);
4951 nfsd4_destroy_callback_queue(); 4950 nfsd4_destroy_callback_queue();
4952} 4951}
4953 4952