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