Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284641
b: refs/heads/master
c: f5c8593
h: refs/heads/master
i:
  284639: 7b2b9a4
v: v3
  • Loading branch information
Stanislav Kinsbursky authored and J. Bruce Fields committed Dec 7, 2011
1 parent 60c25a5 commit e9e8587
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bd4620ddf6d6eb3d9e7d073ad601fa4299d46ba9
refs/heads/master: f5c8593b94190aabdcf207a544f082c7816c4fe6
10 changes: 5 additions & 5 deletions trunk/fs/nfsd/export.c
Original file line number Diff line number Diff line change
Expand Up @@ -1226,12 +1226,12 @@ nfsd_export_init(void)
int rv;
dprintk("nfsd: initializing export module.\n");

rv = cache_register(&svc_export_cache);
rv = cache_register_net(&svc_export_cache, &init_net);
if (rv)
return rv;
rv = cache_register(&svc_expkey_cache);
rv = cache_register_net(&svc_expkey_cache, &init_net);
if (rv)
cache_unregister(&svc_export_cache);
cache_unregister_net(&svc_export_cache, &init_net);
return rv;

}
Expand All @@ -1255,8 +1255,8 @@ nfsd_export_shutdown(void)

dprintk("nfsd: shutting down export module.\n");

cache_unregister(&svc_expkey_cache);
cache_unregister(&svc_export_cache);
cache_unregister_net(&svc_expkey_cache, &init_net);
cache_unregister_net(&svc_export_cache, &init_net);
svcauth_unix_purge();

dprintk("nfsd: export shutdown complete.\n");
Expand Down
11 changes: 6 additions & 5 deletions trunk/fs/nfsd/nfs4idmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <linux/seq_file.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <net/net_namespace.h>
#include "idmap.h"
#include "nfsd.h"

Expand Down Expand Up @@ -466,20 +467,20 @@ nfsd_idmap_init(void)
{
int rv;

rv = cache_register(&idtoname_cache);
rv = cache_register_net(&idtoname_cache, &init_net);
if (rv)
return rv;
rv = cache_register(&nametoid_cache);
rv = cache_register_net(&nametoid_cache, &init_net);
if (rv)
cache_unregister(&idtoname_cache);
cache_unregister_net(&idtoname_cache, &init_net);
return rv;
}

void
nfsd_idmap_shutdown(void)
{
cache_unregister(&idtoname_cache);
cache_unregister(&nametoid_cache);
cache_unregister_net(&idtoname_cache, &init_net);
cache_unregister_net(&nametoid_cache, &init_net);
}

static int
Expand Down
2 changes: 2 additions & 0 deletions trunk/net/sunrpc/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1641,6 +1641,7 @@ int cache_register_net(struct cache_detail *cd, struct net *net)
sunrpc_destroy_cache_detail(cd);
return ret;
}
EXPORT_SYMBOL_GPL(cache_register_net);

int cache_register(struct cache_detail *cd)
{
Expand All @@ -1653,6 +1654,7 @@ void cache_unregister_net(struct cache_detail *cd, struct net *net)
remove_cache_proc_entries(cd, net);
sunrpc_destroy_cache_detail(cd);
}
EXPORT_SYMBOL_GPL(cache_unregister_net);

void cache_unregister(struct cache_detail *cd)
{
Expand Down

0 comments on commit e9e8587

Please sign in to comment.