diff options
Diffstat (limited to 'fs/nfsd/nfs4idmap.c')
-rw-r--r-- | fs/nfsd/nfs4idmap.c | 21 |
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 | ||
148 | static int | 147 | static int |
148 | idtoname_upcall(struct cache_detail *cd, struct cache_head *ch) | ||
149 | { | ||
150 | return sunrpc_cache_pipe_upcall(cd, ch, idtoname_request); | ||
151 | } | ||
152 | |||
153 | static int | ||
149 | idtoname_match(struct cache_head *ca, struct cache_head *cb) | 154 | idtoname_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 | ||
177 | static void | 182 | static void |
178 | warn_no_idmapd(struct cache_detail *detail) | 183 | warn_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 | ||
327 | static int | 332 | static int |
333 | nametoid_upcall(struct cache_detail *cd, struct cache_head *ch) | ||
334 | { | ||
335 | return sunrpc_cache_pipe_upcall(cd, ch, nametoid_request); | ||
336 | } | ||
337 | |||
338 | static int | ||
328 | nametoid_match(struct cache_head *ca, struct cache_head *cb) | 339 | nametoid_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, |