Merge branch 'core-speculation-for-linus' of git://git.kernel.org/pub/scm/linux/kerne...
[linux-2.6-microblaze.git] / net / sunrpc / svc.c
index e87ddb9..dbd1969 100644 (file)
@@ -1144,17 +1144,6 @@ void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...)
 static __printf(2,3) void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...) {}
 #endif
 
-/*
- * Setup response header for TCP, it has a 4B record length field.
- */
-static void svc_tcp_prep_reply_hdr(struct svc_rqst *rqstp)
-{
-       struct kvec *resv = &rqstp->rq_res.head[0];
-
-       /* tcp needs a space for the record length... */
-       svc_putnl(resv, 0);
-}
-
 /*
  * Common routine for processing the RPC request.
  */
@@ -1182,10 +1171,6 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
        set_bit(RQ_USEDEFERRAL, &rqstp->rq_flags);
        clear_bit(RQ_DROPME, &rqstp->rq_flags);
 
-       /* Setup reply header */
-       if (rqstp->rq_prot == IPPROTO_TCP)
-               svc_tcp_prep_reply_hdr(rqstp);
-
        svc_putu32(resv, rqstp->rq_xid);
 
        vers = svc_getnl(argv);
@@ -1443,6 +1428,10 @@ svc_process(struct svc_rqst *rqstp)
                goto out_drop;
        }
 
+       /* Reserve space for the record marker */
+       if (rqstp->rq_prot == IPPROTO_TCP)
+               svc_putnl(resv, 0);
+
        /* Returns 1 for send, 0 for drop */
        if (likely(svc_process_common(rqstp, argv, resv)))
                return svc_send(rqstp);