aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfsd/nfssvc.c2
-rw-r--r--include/linux/sunrpc/svc.h2
-rw-r--r--include/trace/events/sunrpc.h8
-rw-r--r--net/sunrpc/svc.c4
-rw-r--r--net/sunrpc/svc_xprt.c2
5 files changed, 9 insertions, 9 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 752d56bbe0ba..314f5c8f8f1a 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -692,7 +692,7 @@ nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
692 /* Now call the procedure handler, and encode NFS status. */ 692 /* Now call the procedure handler, and encode NFS status. */
693 nfserr = proc->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp); 693 nfserr = proc->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp);
694 nfserr = map_new_errors(rqstp->rq_vers, nfserr); 694 nfserr = map_new_errors(rqstp->rq_vers, nfserr);
695 if (nfserr == nfserr_dropit || rqstp->rq_dropme) { 695 if (nfserr == nfserr_dropit || test_bit(RQ_DROPME, &rqstp->rq_flags)) {
696 dprintk("nfsd: Dropping request; may be revisited later\n"); 696 dprintk("nfsd: Dropping request; may be revisited later\n");
697 nfsd_cache_update(rqstp, RC_NOCACHE, NULL); 697 nfsd_cache_update(rqstp, RC_NOCACHE, NULL);
698 return 0; 698 return 0;
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 6a3cf4c76dce..d4ea3e5246b0 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -255,6 +255,7 @@ struct svc_rqst {
255#define RQ_SECURE (0) /* secure port */ 255#define RQ_SECURE (0) /* secure port */
256#define RQ_LOCAL (1) /* local request */ 256#define RQ_LOCAL (1) /* local request */
257#define RQ_USEDEFERRAL (2) /* use deferral */ 257#define RQ_USEDEFERRAL (2) /* use deferral */
258#define RQ_DROPME (3) /* drop current reply */
258 unsigned long rq_flags; /* flags field */ 259 unsigned long rq_flags; /* flags field */
259 260
260 void * rq_argp; /* decoded arguments */ 261 void * rq_argp; /* decoded arguments */
@@ -271,7 +272,6 @@ struct svc_rqst {
271 struct cache_req rq_chandle; /* handle passed to caches for 272 struct cache_req rq_chandle; /* handle passed to caches for
272 * request delaying 273 * request delaying
273 */ 274 */
274 bool rq_dropme;
275 /* Catering to nfsd */ 275 /* Catering to nfsd */
276 struct auth_domain * rq_client; /* RPC peer info */ 276 struct auth_domain * rq_client; /* RPC peer info */
277 struct auth_domain * rq_gssclient; /* "gss/"-style peer info */ 277 struct auth_domain * rq_gssclient; /* "gss/"-style peer info */
diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h
index 6d1facdebc92..355671f19a9f 100644
--- a/include/trace/events/sunrpc.h
+++ b/include/trace/events/sunrpc.h
@@ -416,7 +416,8 @@ TRACE_EVENT(xs_tcp_data_recv,
416 __print_flags(flags, "|", \ 416 __print_flags(flags, "|", \
417 { (1UL << RQ_SECURE), "RQ_SECURE"}, \ 417 { (1UL << RQ_SECURE), "RQ_SECURE"}, \
418 { (1UL << RQ_LOCAL), "RQ_LOCAL"}, \ 418 { (1UL << RQ_LOCAL), "RQ_LOCAL"}, \
419 { (1UL << RQ_USEDEFERRAL), "RQ_USEDEFERRAL"}) 419 { (1UL << RQ_USEDEFERRAL), "RQ_USEDEFERRAL"}, \
420 { (1UL << RQ_DROPME), "RQ_DROPME"})
420 421
421TRACE_EVENT(svc_recv, 422TRACE_EVENT(svc_recv,
422 TP_PROTO(struct svc_rqst *rqst, int status), 423 TP_PROTO(struct svc_rqst *rqst, int status),
@@ -459,13 +460,12 @@ DECLARE_EVENT_CLASS(svc_rqst_status,
459 TP_fast_assign( 460 TP_fast_assign(
460 __entry->addr = (struct sockaddr *)&rqst->rq_addr; 461 __entry->addr = (struct sockaddr *)&rqst->rq_addr;
461 __entry->xid = rqst->rq_xid; 462 __entry->xid = rqst->rq_xid;
462 __entry->dropme = (int)rqst->rq_dropme;
463 __entry->status = status; 463 __entry->status = status;
464 __entry->flags = rqst->rq_flags; 464 __entry->flags = rqst->rq_flags;
465 ), 465 ),
466 466
467 TP_printk("addr=%pIScp rq_xid=0x%x dropme=%d status=%d flags=%s", 467 TP_printk("addr=%pIScp rq_xid=0x%x status=%d flags=%s",
468 __entry->addr, be32_to_cpu(__entry->xid), __entry->dropme, 468 __entry->addr, be32_to_cpu(__entry->xid),
469 __entry->status, show_rqstp_flags(__entry->flags)) 469 __entry->status, show_rqstp_flags(__entry->flags))
470); 470);
471 471
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index f6a8f2f7a253..d8a9d603b786 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -1091,7 +1091,7 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
1091 rqstp->rq_splice_ok = true; 1091 rqstp->rq_splice_ok = true;
1092 /* Will be turned off only when NFSv4 Sessions are used */ 1092 /* Will be turned off only when NFSv4 Sessions are used */
1093 set_bit(RQ_USEDEFERRAL, &rqstp->rq_flags); 1093 set_bit(RQ_USEDEFERRAL, &rqstp->rq_flags);
1094 rqstp->rq_dropme = false; 1094 clear_bit(RQ_DROPME, &rqstp->rq_flags);
1095 1095
1096 /* Setup reply header */ 1096 /* Setup reply header */
1097 rqstp->rq_xprt->xpt_ops->xpo_prep_reply_hdr(rqstp); 1097 rqstp->rq_xprt->xpt_ops->xpo_prep_reply_hdr(rqstp);
@@ -1191,7 +1191,7 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
1191 *statp = procp->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp); 1191 *statp = procp->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp);
1192 1192
1193 /* Encode reply */ 1193 /* Encode reply */
1194 if (rqstp->rq_dropme) { 1194 if (test_bit(RQ_DROPME, &rqstp->rq_flags)) {
1195 if (procp->pc_release) 1195 if (procp->pc_release)
1196 procp->pc_release(rqstp, NULL, rqstp->rq_resp); 1196 procp->pc_release(rqstp, NULL, rqstp->rq_resp);
1197 goto dropit; 1197 goto dropit;
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index a40f3755a33d..143c4c8ea2f1 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -1110,7 +1110,7 @@ static struct cache_deferred_req *svc_defer(struct cache_req *req)
1110 } 1110 }
1111 svc_xprt_get(rqstp->rq_xprt); 1111 svc_xprt_get(rqstp->rq_xprt);
1112 dr->xprt = rqstp->rq_xprt; 1112 dr->xprt = rqstp->rq_xprt;
1113 rqstp->rq_dropme = true; 1113 set_bit(RQ_DROPME, &rqstp->rq_flags);
1114 1114
1115 dr->handle.revisit = svc_revisit; 1115 dr->handle.revisit = svc_revisit;
1116 return &dr->handle; 1116 return &dr->handle;