aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-10-17 03:10:18 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-17 11:18:46 -0400
commitd343fce148a4eee24a907a05c4101d3268045aae (patch)
treeb8a110f85050b2425ce85434c01c0eac0076472b /net
parent4481d1038f4116f3f5c307d919e6dc815a3acbb9 (diff)
[PATCH] knfsd: Allow lockd to drop replies as appropriate
It is possible for the ->fopen callback from lockd into nfsd to find that an answer cannot be given straight away (an upcall is needed) and so the request has to be 'dropped', to be retried later. That error status is not currently propagated back. So: Change nlm_fopen to return nlm error codes (rather than a private protocol) and define a new nlm_drop_reply code. Cause nlm_drop_reply to cause the rpc request to get rpc_drop_reply when this error comes back. Cause svc_process to drop a request which returns a status of rpc_drop_reply. [akpm@osdl.org: fix warning storm] Cc: Marc Eshel <eshel@almaden.ibm.com> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/svc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 2807fa0eab40..eb44ec929ca1 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -828,6 +828,11 @@ svc_process(struct svc_rqst *rqstp)
828 *statp = procp->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp); 828 *statp = procp->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp);
829 829
830 /* Encode reply */ 830 /* Encode reply */
831 if (*statp == rpc_drop_reply) {
832 if (procp->pc_release)
833 procp->pc_release(rqstp, NULL, rqstp->rq_resp);
834 goto dropit;
835 }
831 if (*statp == rpc_success && (xdr = procp->pc_encode) 836 if (*statp == rpc_success && (xdr = procp->pc_encode)
832 && !xdr(rqstp, resv->iov_base+resv->iov_len, rqstp->rq_resp)) { 837 && !xdr(rqstp, resv->iov_base+resv->iov_len, rqstp->rq_resp)) {
833 dprintk("svc: failed to encode reply\n"); 838 dprintk("svc: failed to encode reply\n");