diff options
Diffstat (limited to 'net/sunrpc/svc.c')
-rw-r--r-- | net/sunrpc/svc.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index e87ddb9f7feb..dbd19697ee38 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -1145,17 +1145,6 @@ static __printf(2,3) void svc_printk(struct svc_rqst *rqstp, const char *fmt, .. | |||
1145 | #endif | 1145 | #endif |
1146 | 1146 | ||
1147 | /* | 1147 | /* |
1148 | * Setup response header for TCP, it has a 4B record length field. | ||
1149 | */ | ||
1150 | static void svc_tcp_prep_reply_hdr(struct svc_rqst *rqstp) | ||
1151 | { | ||
1152 | struct kvec *resv = &rqstp->rq_res.head[0]; | ||
1153 | |||
1154 | /* tcp needs a space for the record length... */ | ||
1155 | svc_putnl(resv, 0); | ||
1156 | } | ||
1157 | |||
1158 | /* | ||
1159 | * Common routine for processing the RPC request. | 1148 | * Common routine for processing the RPC request. |
1160 | */ | 1149 | */ |
1161 | static int | 1150 | static int |
@@ -1182,10 +1171,6 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv) | |||
1182 | set_bit(RQ_USEDEFERRAL, &rqstp->rq_flags); | 1171 | set_bit(RQ_USEDEFERRAL, &rqstp->rq_flags); |
1183 | clear_bit(RQ_DROPME, &rqstp->rq_flags); | 1172 | clear_bit(RQ_DROPME, &rqstp->rq_flags); |
1184 | 1173 | ||
1185 | /* Setup reply header */ | ||
1186 | if (rqstp->rq_prot == IPPROTO_TCP) | ||
1187 | svc_tcp_prep_reply_hdr(rqstp); | ||
1188 | |||
1189 | svc_putu32(resv, rqstp->rq_xid); | 1174 | svc_putu32(resv, rqstp->rq_xid); |
1190 | 1175 | ||
1191 | vers = svc_getnl(argv); | 1176 | vers = svc_getnl(argv); |
@@ -1443,6 +1428,10 @@ svc_process(struct svc_rqst *rqstp) | |||
1443 | goto out_drop; | 1428 | goto out_drop; |
1444 | } | 1429 | } |
1445 | 1430 | ||
1431 | /* Reserve space for the record marker */ | ||
1432 | if (rqstp->rq_prot == IPPROTO_TCP) | ||
1433 | svc_putnl(resv, 0); | ||
1434 | |||
1446 | /* Returns 1 for send, 0 for drop */ | 1435 | /* Returns 1 for send, 0 for drop */ |
1447 | if (likely(svc_process_common(rqstp, argv, resv))) | 1436 | if (likely(svc_process_common(rqstp, argv, resv))) |
1448 | return svc_send(rqstp); | 1437 | return svc_send(rqstp); |