diff options
-rw-r--r-- | fs/nfsd/nfssvc.c | 2 | ||||
-rw-r--r-- | include/linux/sunrpc/svc.h | 1 | ||||
-rw-r--r-- | net/sunrpc/svc.c | 3 | ||||
-rw-r--r-- | net/sunrpc/svc_xprt.c | 1 |
4 files changed, 5 insertions, 2 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index 2bae1d86f5f2..18743c4d8bca 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c | |||
@@ -608,7 +608,7 @@ nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp) | |||
608 | /* Now call the procedure handler, and encode NFS status. */ | 608 | /* Now call the procedure handler, and encode NFS status. */ |
609 | nfserr = proc->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp); | 609 | nfserr = proc->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp); |
610 | nfserr = map_new_errors(rqstp->rq_vers, nfserr); | 610 | nfserr = map_new_errors(rqstp->rq_vers, nfserr); |
611 | if (nfserr == nfserr_dropit) { | 611 | if (nfserr == nfserr_dropit || rqstp->rq_dropme) { |
612 | dprintk("nfsd: Dropping request; may be revisited later\n"); | 612 | dprintk("nfsd: Dropping request; may be revisited later\n"); |
613 | nfsd_cache_update(rqstp, RC_NOCACHE, NULL); | 613 | nfsd_cache_update(rqstp, RC_NOCACHE, NULL); |
614 | return 0; | 614 | return 0; |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 5a3085b9b394..d45c482b6444 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -269,6 +269,7 @@ struct svc_rqst { | |||
269 | struct cache_req rq_chandle; /* handle passed to caches for | 269 | struct cache_req rq_chandle; /* handle passed to caches for |
270 | * request delaying | 270 | * request delaying |
271 | */ | 271 | */ |
272 | bool rq_dropme; | ||
272 | /* Catering to nfsd */ | 273 | /* Catering to nfsd */ |
273 | struct auth_domain * rq_client; /* RPC peer info */ | 274 | struct auth_domain * rq_client; /* RPC peer info */ |
274 | struct auth_domain * rq_gssclient; /* "gss/"-style peer info */ | 275 | struct auth_domain * rq_gssclient; /* "gss/"-style peer info */ |
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 6359c42c4941..df1931f8ae98 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -1005,6 +1005,7 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv) | |||
1005 | rqstp->rq_splice_ok = 1; | 1005 | rqstp->rq_splice_ok = 1; |
1006 | /* Will be turned off only when NFSv4 Sessions are used */ | 1006 | /* Will be turned off only when NFSv4 Sessions are used */ |
1007 | rqstp->rq_usedeferral = 1; | 1007 | rqstp->rq_usedeferral = 1; |
1008 | rqstp->rq_dropme = false; | ||
1008 | 1009 | ||
1009 | /* Setup reply header */ | 1010 | /* Setup reply header */ |
1010 | rqstp->rq_xprt->xpt_ops->xpo_prep_reply_hdr(rqstp); | 1011 | rqstp->rq_xprt->xpt_ops->xpo_prep_reply_hdr(rqstp); |
@@ -1106,7 +1107,7 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv) | |||
1106 | *statp = procp->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp); | 1107 | *statp = procp->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp); |
1107 | 1108 | ||
1108 | /* Encode reply */ | 1109 | /* Encode reply */ |
1109 | if (*statp == rpc_drop_reply) { | 1110 | if (rqstp->rq_dropme) { |
1110 | if (procp->pc_release) | 1111 | if (procp->pc_release) |
1111 | procp->pc_release(rqstp, NULL, rqstp->rq_resp); | 1112 | procp->pc_release(rqstp, NULL, rqstp->rq_resp); |
1112 | goto dropit; | 1113 | goto dropit; |
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 5eae53b1e306..173f3b975d49 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c | |||
@@ -1019,6 +1019,7 @@ static struct cache_deferred_req *svc_defer(struct cache_req *req) | |||
1019 | } | 1019 | } |
1020 | svc_xprt_get(rqstp->rq_xprt); | 1020 | svc_xprt_get(rqstp->rq_xprt); |
1021 | dr->xprt = rqstp->rq_xprt; | 1021 | dr->xprt = rqstp->rq_xprt; |
1022 | rqstp->rq_dropme = true; | ||
1022 | 1023 | ||
1023 | dr->handle.revisit = svc_revisit; | 1024 | dr->handle.revisit = svc_revisit; |
1024 | return &dr->handle; | 1025 | return &dr->handle; |