aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4idmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/nfs4idmap.c')
-rw-r--r--fs/nfsd/nfs4idmap.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c
index 5b398421b051..ba2c199592fd 100644
--- a/fs/nfsd/nfs4idmap.c
+++ b/fs/nfsd/nfs4idmap.c
@@ -38,7 +38,6 @@
38#include <linux/init.h> 38#include <linux/init.h>
39 39
40#include <linux/mm.h> 40#include <linux/mm.h>
41#include <linux/utsname.h>
42#include <linux/errno.h> 41#include <linux/errno.h>
43#include <linux/string.h> 42#include <linux/string.h>
44#include <linux/sunrpc/clnt.h> 43#include <linux/sunrpc/clnt.h>
@@ -146,6 +145,12 @@ idtoname_request(struct cache_detail *cd, struct cache_head *ch, char **bpp,
146} 145}
147 146
148static int 147static int
148idtoname_upcall(struct cache_detail *cd, struct cache_head *ch)
149{
150 return sunrpc_cache_pipe_upcall(cd, ch, idtoname_request);
151}
152
153static int
149idtoname_match(struct cache_head *ca, struct cache_head *cb) 154idtoname_match(struct cache_head *ca, struct cache_head *cb)
150{ 155{
151 struct ent *a = container_of(ca, struct ent, h); 156 struct ent *a = container_of(ca, struct ent, h);
@@ -175,10 +180,10 @@ idtoname_show(struct seq_file *m, struct cache_detail *cd, struct cache_head *h)
175} 180}
176 181
177static void 182static void
178warn_no_idmapd(struct cache_detail *detail) 183warn_no_idmapd(struct cache_detail *detail, int has_died)
179{ 184{
180 printk("nfsd: nfsv4 idmapping failing: has idmapd %s?\n", 185 printk("nfsd: nfsv4 idmapping failing: has idmapd %s?\n",
181 detail->last_close? "died" : "not been started"); 186 has_died ? "died" : "not been started");
182} 187}
183 188
184 189
@@ -192,7 +197,7 @@ static struct cache_detail idtoname_cache = {
192 .hash_table = idtoname_table, 197 .hash_table = idtoname_table,
193 .name = "nfs4.idtoname", 198 .name = "nfs4.idtoname",
194 .cache_put = ent_put, 199 .cache_put = ent_put,
195 .cache_request = idtoname_request, 200 .cache_upcall = idtoname_upcall,
196 .cache_parse = idtoname_parse, 201 .cache_parse = idtoname_parse,
197 .cache_show = idtoname_show, 202 .cache_show = idtoname_show,
198 .warn_no_listener = warn_no_idmapd, 203 .warn_no_listener = warn_no_idmapd,
@@ -325,6 +330,12 @@ nametoid_request(struct cache_detail *cd, struct cache_head *ch, char **bpp,
325} 330}
326 331
327static int 332static int
333nametoid_upcall(struct cache_detail *cd, struct cache_head *ch)
334{
335 return sunrpc_cache_pipe_upcall(cd, ch, nametoid_request);
336}
337
338static int
328nametoid_match(struct cache_head *ca, struct cache_head *cb) 339nametoid_match(struct cache_head *ca, struct cache_head *cb)
329{ 340{
330 struct ent *a = container_of(ca, struct ent, h); 341 struct ent *a = container_of(ca, struct ent, h);
@@ -363,7 +374,7 @@ static struct cache_detail nametoid_cache = {
363 .hash_table = nametoid_table, 374 .hash_table = nametoid_table,
364 .name = "nfs4.nametoid", 375 .name = "nfs4.nametoid",
365 .cache_put = ent_put, 376 .cache_put = ent_put,
366 .cache_request = nametoid_request, 377 .cache_upcall = nametoid_upcall,
367 .cache_parse = nametoid_parse, 378 .cache_parse = nametoid_parse,
368 .cache_show = nametoid_show, 379 .cache_show = nametoid_show,
369 .warn_no_listener = warn_no_idmapd, 380 .warn_no_listener = warn_no_idmapd,