diff options
Diffstat (limited to 'fs/nfsd/export.c')
-rw-r--r-- | fs/nfsd/export.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index b92a27629fb7..c1c9e035d4a4 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c | |||
@@ -85,6 +85,11 @@ static void expkey_request(struct cache_detail *cd, | |||
85 | (*bpp)[-1] = '\n'; | 85 | (*bpp)[-1] = '\n'; |
86 | } | 86 | } |
87 | 87 | ||
88 | static int expkey_upcall(struct cache_detail *cd, struct cache_head *h) | ||
89 | { | ||
90 | return sunrpc_cache_pipe_upcall(cd, h, expkey_request); | ||
91 | } | ||
92 | |||
88 | static struct svc_expkey *svc_expkey_update(struct svc_expkey *new, struct svc_expkey *old); | 93 | static struct svc_expkey *svc_expkey_update(struct svc_expkey *new, struct svc_expkey *old); |
89 | static struct svc_expkey *svc_expkey_lookup(struct svc_expkey *); | 94 | static struct svc_expkey *svc_expkey_lookup(struct svc_expkey *); |
90 | static struct cache_detail svc_expkey_cache; | 95 | static struct cache_detail svc_expkey_cache; |
@@ -259,7 +264,7 @@ static struct cache_detail svc_expkey_cache = { | |||
259 | .hash_table = expkey_table, | 264 | .hash_table = expkey_table, |
260 | .name = "nfsd.fh", | 265 | .name = "nfsd.fh", |
261 | .cache_put = expkey_put, | 266 | .cache_put = expkey_put, |
262 | .cache_request = expkey_request, | 267 | .cache_upcall = expkey_upcall, |
263 | .cache_parse = expkey_parse, | 268 | .cache_parse = expkey_parse, |
264 | .cache_show = expkey_show, | 269 | .cache_show = expkey_show, |
265 | .match = expkey_match, | 270 | .match = expkey_match, |
@@ -355,6 +360,11 @@ static void svc_export_request(struct cache_detail *cd, | |||
355 | (*bpp)[-1] = '\n'; | 360 | (*bpp)[-1] = '\n'; |
356 | } | 361 | } |
357 | 362 | ||
363 | static int svc_export_upcall(struct cache_detail *cd, struct cache_head *h) | ||
364 | { | ||
365 | return sunrpc_cache_pipe_upcall(cd, h, svc_export_request); | ||
366 | } | ||
367 | |||
358 | static struct svc_export *svc_export_update(struct svc_export *new, | 368 | static struct svc_export *svc_export_update(struct svc_export *new, |
359 | struct svc_export *old); | 369 | struct svc_export *old); |
360 | static struct svc_export *svc_export_lookup(struct svc_export *); | 370 | static struct svc_export *svc_export_lookup(struct svc_export *); |
@@ -724,7 +734,7 @@ struct cache_detail svc_export_cache = { | |||
724 | .hash_table = export_table, | 734 | .hash_table = export_table, |
725 | .name = "nfsd.export", | 735 | .name = "nfsd.export", |
726 | .cache_put = svc_export_put, | 736 | .cache_put = svc_export_put, |
727 | .cache_request = svc_export_request, | 737 | .cache_upcall = svc_export_upcall, |
728 | .cache_parse = svc_export_parse, | 738 | .cache_parse = svc_export_parse, |
729 | .cache_show = svc_export_show, | 739 | .cache_show = svc_export_show, |
730 | .match = svc_export_match, | 740 | .match = svc_export_match, |
@@ -1331,6 +1341,8 @@ exp_pseudoroot(struct svc_rqst *rqstp, struct svc_fh *fhp) | |||
1331 | if (rv) | 1341 | if (rv) |
1332 | goto out; | 1342 | goto out; |
1333 | rv = check_nfsd_access(exp, rqstp); | 1343 | rv = check_nfsd_access(exp, rqstp); |
1344 | if (rv) | ||
1345 | fh_put(fhp); | ||
1334 | out: | 1346 | out: |
1335 | exp_put(exp); | 1347 | exp_put(exp); |
1336 | return rv; | 1348 | return rv; |
@@ -1505,7 +1517,7 @@ static int e_show(struct seq_file *m, void *p) | |||
1505 | return svc_export_show(m, &svc_export_cache, cp); | 1517 | return svc_export_show(m, &svc_export_cache, cp); |
1506 | } | 1518 | } |
1507 | 1519 | ||
1508 | struct seq_operations nfs_exports_op = { | 1520 | const struct seq_operations nfs_exports_op = { |
1509 | .start = e_start, | 1521 | .start = e_start, |
1510 | .next = e_next, | 1522 | .next = e_next, |
1511 | .stop = e_stop, | 1523 | .stop = e_stop, |