aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfsd/nfsctl.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index d6e8b85c6b7f..72699885ac48 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -1145,14 +1145,20 @@ static __net_init int nfsd_init_net(struct net *net)
1145 retval = nfsd_export_init(net); 1145 retval = nfsd_export_init(net);
1146 if (retval) 1146 if (retval)
1147 goto out_export_error; 1147 goto out_export_error;
1148 retval = nfsd_idmap_init(net);
1149 if (retval)
1150 goto out_idmap_error;
1148 return 0; 1151 return 0;
1149 1152
1153out_idmap_error:
1154 nfsd_export_shutdown(net);
1150out_export_error: 1155out_export_error:
1151 return retval; 1156 return retval;
1152} 1157}
1153 1158
1154static __net_exit void nfsd_exit_net(struct net *net) 1159static __net_exit void nfsd_exit_net(struct net *net)
1155{ 1160{
1161 nfsd_idmap_shutdown(net);
1156 nfsd_export_shutdown(net); 1162 nfsd_export_shutdown(net);
1157} 1163}
1158 1164
@@ -1186,12 +1192,9 @@ static int __init init_nfsd(void)
1186 if (retval) 1192 if (retval)
1187 goto out_free_stat; 1193 goto out_free_stat;
1188 nfsd_lockd_init(); /* lockd->nfsd callbacks */ 1194 nfsd_lockd_init(); /* lockd->nfsd callbacks */
1189 retval = nfsd_idmap_init(&init_net);
1190 if (retval)
1191 goto out_free_lockd;
1192 retval = create_proc_exports_entry(); 1195 retval = create_proc_exports_entry();
1193 if (retval) 1196 if (retval)
1194 goto out_free_idmap; 1197 goto out_free_lockd;
1195 retval = register_filesystem(&nfsd_fs_type); 1198 retval = register_filesystem(&nfsd_fs_type);
1196 if (retval) 1199 if (retval)
1197 goto out_free_all; 1200 goto out_free_all;
@@ -1199,8 +1202,6 @@ static int __init init_nfsd(void)
1199out_free_all: 1202out_free_all:
1200 remove_proc_entry("fs/nfs/exports", NULL); 1203 remove_proc_entry("fs/nfs/exports", NULL);
1201 remove_proc_entry("fs/nfs", NULL); 1204 remove_proc_entry("fs/nfs", NULL);
1202out_free_idmap:
1203 nfsd_idmap_shutdown(&init_net);
1204out_free_lockd: 1205out_free_lockd:
1205 nfsd_lockd_shutdown(); 1206 nfsd_lockd_shutdown();
1206 nfsd_reply_cache_shutdown(); 1207 nfsd_reply_cache_shutdown();
@@ -1223,7 +1224,6 @@ static void __exit exit_nfsd(void)
1223 remove_proc_entry("fs/nfs", NULL); 1224 remove_proc_entry("fs/nfs", NULL);
1224 nfsd_stat_shutdown(); 1225 nfsd_stat_shutdown();
1225 nfsd_lockd_shutdown(); 1226 nfsd_lockd_shutdown();
1226 nfsd_idmap_shutdown(&init_net);
1227 nfsd4_free_slabs(); 1227 nfsd4_free_slabs();
1228 nfsd_fault_inject_cleanup(); 1228 nfsd_fault_inject_cleanup();
1229 unregister_filesystem(&nfsd_fs_type); 1229 unregister_filesystem(&nfsd_fs_type);