Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46b25895 authored by J. Bruce Fields's avatar J. Bruce Fields
Browse files

knfsd: cleanup nfsd4 properly on module init failure



We forgot to shut down the nfs4 state and idmapping code in this case.

Acked-by: default avatarNeilBrown <neilb@suse.de>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent ca2a05aa
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -695,12 +695,14 @@ static int __init init_nfsd(void)
	}
	}
	retval = register_filesystem(&nfsd_fs_type);
	retval = register_filesystem(&nfsd_fs_type);
	if (retval) {
	if (retval) {
		nfsd_idmap_shutdown();
		nfsd_export_shutdown();
		nfsd_export_shutdown();
		nfsd_cache_shutdown();
		nfsd_cache_shutdown();
		remove_proc_entry("fs/nfs/exports", NULL);
		remove_proc_entry("fs/nfs/exports", NULL);
		remove_proc_entry("fs/nfs", NULL);
		remove_proc_entry("fs/nfs", NULL);
		nfsd_stat_shutdown();
		nfsd_stat_shutdown();
		nfsd_lockd_shutdown();
		nfsd_lockd_shutdown();
		nfsd4_free_slabs();
	}
	}
	return retval;
	return retval;
}
}