mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
NFSv4: Move the DNS resolver into the NFSv4 module
The other protocols don't use it, so make it local to NFSv4, and remove the EXPORT. Also ensure that we only compile in cache_lib.o if we're using the legacy DNS resolver. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: Bryan Schumaker <bjschuma@netapp.com>
This commit is contained in:
parent
e401452d92
commit
c8d74d9b68
4 changed files with 44 additions and 19 deletions
|
@ -48,7 +48,6 @@
|
|||
#include "iostat.h"
|
||||
#include "internal.h"
|
||||
#include "fscache.h"
|
||||
#include "dns_resolve.h"
|
||||
#include "pnfs.h"
|
||||
#include "nfs.h"
|
||||
#include "netns.h"
|
||||
|
@ -1646,12 +1645,11 @@ EXPORT_SYMBOL_GPL(nfs_net_id);
|
|||
static int nfs_net_init(struct net *net)
|
||||
{
|
||||
nfs_clients_init(net);
|
||||
return nfs_dns_resolver_cache_init(net);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void nfs_net_exit(struct net *net)
|
||||
{
|
||||
nfs_dns_resolver_cache_destroy(net);
|
||||
nfs_cleanup_cb_ident_idr(net);
|
||||
}
|
||||
|
||||
|
@ -1669,10 +1667,6 @@ static int __init init_nfs_fs(void)
|
|||
{
|
||||
int err;
|
||||
|
||||
err = nfs_dns_resolver_init();
|
||||
if (err < 0)
|
||||
goto out10;;
|
||||
|
||||
err = register_pernet_subsys(&nfs_net_ops);
|
||||
if (err < 0)
|
||||
goto out9;
|
||||
|
@ -1738,8 +1732,6 @@ out7:
|
|||
out8:
|
||||
unregister_pernet_subsys(&nfs_net_ops);
|
||||
out9:
|
||||
nfs_dns_resolver_destroy();
|
||||
out10:
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -1752,7 +1744,6 @@ static void __exit exit_nfs_fs(void)
|
|||
nfs_destroy_nfspagecache();
|
||||
nfs_fscache_unregister();
|
||||
unregister_pernet_subsys(&nfs_net_ops);
|
||||
nfs_dns_resolver_destroy();
|
||||
#ifdef CONFIG_PROC_FS
|
||||
rpc_proc_unregister(&init_net, "nfs");
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue