From: J. Bruce Fields Date: Fri, 9 Nov 2007 17:31:55 +0000 (-0500) Subject: knfsd: cleanup nfsd4 properly on module init failure X-Git-Tag: firefly_0821_release~23565^2~84 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=46b25895767c606c630a97b03a895934a7a36a70;p=firefly-linux-kernel-4.4.55.git knfsd: cleanup nfsd4 properly on module init failure We forgot to shut down the nfs4 state and idmapping code in this case. Acked-by: NeilBrown Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 77dc9893b7ba..d8d50a773a5b 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -695,12 +695,14 @@ static int __init init_nfsd(void) } retval = register_filesystem(&nfsd_fs_type); if (retval) { + nfsd_idmap_shutdown(); nfsd_export_shutdown(); nfsd_cache_shutdown(); remove_proc_entry("fs/nfs/exports", NULL); remove_proc_entry("fs/nfs", NULL); nfsd_stat_shutdown(); nfsd_lockd_shutdown(); + nfsd4_free_slabs(); } return retval; }