aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfsctl.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2007-08-01 15:30:59 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2007-10-09 18:31:56 -0400
commite8ff2a8453cedf38d6d7a0528cb9c308066a3e3e (patch)
tree6987fee75558983f92cbba7385e39acc44f7555e /fs/nfsd/nfsctl.c
parent2b47eece1fa519a81c8b802af77a8b8aa44baa10 (diff)
knfsd: move nfsv4 slab creation/destruction to module init/exit
We have some slabs that the nfs4 server uses to store state objects. We're currently creating and destroying those slabs whenever the server is brought up or down. That seems excessive; may as well just do that in module initialization and exit. Also add some minor header cleanup. (Thanks to Andrew Morton for that and a compile fix.) Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Acked-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'fs/nfsd/nfsctl.c')
-rw-r--r--fs/nfsd/nfsctl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index baac89d917ca..d135f5f98519 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -679,11 +679,13 @@ static int __init init_nfsd(void)
679 int retval; 679 int retval;
680 printk(KERN_INFO "Installing knfsd (copyright (C) 1996 okir@monad.swb.de).\n"); 680 printk(KERN_INFO "Installing knfsd (copyright (C) 1996 okir@monad.swb.de).\n");
681 681
682 retval = nfs4_state_init(); /* nfs4 locking state */
683 if (retval)
684 return retval;
682 nfsd_stat_init(); /* Statistics */ 685 nfsd_stat_init(); /* Statistics */
683 nfsd_cache_init(); /* RPC reply cache */ 686 nfsd_cache_init(); /* RPC reply cache */
684 nfsd_export_init(); /* Exports table */ 687 nfsd_export_init(); /* Exports table */
685 nfsd_lockd_init(); /* lockd->nfsd callbacks */ 688 nfsd_lockd_init(); /* lockd->nfsd callbacks */
686 nfs4_state_init(); /* NFSv4 locking state */
687 nfsd_idmap_init(); /* Name to ID mapping */ 689 nfsd_idmap_init(); /* Name to ID mapping */
688 if (proc_mkdir("fs/nfs", NULL)) { 690 if (proc_mkdir("fs/nfs", NULL)) {
689 struct proc_dir_entry *entry; 691 struct proc_dir_entry *entry;
@@ -712,6 +714,7 @@ static void __exit exit_nfsd(void)
712 nfsd_stat_shutdown(); 714 nfsd_stat_shutdown();
713 nfsd_lockd_shutdown(); 715 nfsd_lockd_shutdown();
714 nfsd_idmap_shutdown(); 716 nfsd_idmap_shutdown();
717 nfsd4_free_slabs();
715 unregister_filesystem(&nfsd_fs_type); 718 unregister_filesystem(&nfsd_fs_type);
716} 719}
717 720