From: Chuck Lever <chuck.le...@oracle.com>

Refactor:

I'm about to use the loop variable @i for something else.

As far as the "i++" is concerned, that is a post-increment. The
value of @i is not used subsequently, so the increment operator
is unnecessary and can be removed.

Also note that nfsd_read_actor() was renamed nfsd_splice_actor()
by commit cf8208d0eabd ("sendfile: convert nfsd to
splice_direct_to_actor()").

Signed-off-by: Chuck Lever <chuck.le...@oracle.com>
Signed-off-by: Mel Gorman <mgor...@techsingularity.net>
---
 net/sunrpc/svc_xprt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index dcc50ae54550..cfa7e4776d0e 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -667,8 +667,8 @@ static int svc_alloc_arg(struct svc_rqst *rqstp)
                        }
                        rqstp->rq_pages[i] = p;
                }
-       rqstp->rq_page_end = &rqstp->rq_pages[i];
-       rqstp->rq_pages[i++] = NULL; /* this might be seen in nfs_read_actor */
+       rqstp->rq_page_end = &rqstp->rq_pages[pages];
+       rqstp->rq_pages[pages] = NULL; /* this might be seen in 
nfsd_splice_actor() */
 
        /* Make arg->head point to first page and arg->pages point to rest */
        arg = &rqstp->rq_arg;
-- 
2.26.2

Reply via email to