diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2011-12-07 09:57:56 (GMT) |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2011-12-07 20:27:46 (GMT) |
commit | f5c8593b94190aabdcf207a544f082c7816c4fe6 (patch) | |
tree | e0f4d5bd999cba6ec806216aeffd3953c480f295 /fs/nfsd/nfs4idmap.c | |
parent | bd4620ddf6d6eb3d9e7d073ad601fa4299d46ba9 (diff) | |
download | linux-fsl-qoriq-f5c8593b94190aabdcf207a544f082c7816c4fe6.tar.xz |
NFSd: use network-namespace-aware cache registering routines
v2: cache_register_net() and cache_unregister_net() GPL exports added
This is a cleanup patch. Hope, some day generic cache_register() and
cache_unregister() will be removed.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4idmap.c')
-rw-r--r-- | fs/nfsd/nfs4idmap.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c index 55780a2..9409627 100644 --- a/fs/nfsd/nfs4idmap.c +++ b/fs/nfsd/nfs4idmap.c @@ -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" @@ -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 |