Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1648263pxb; Mon, 22 Feb 2021 07:27:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxWH94u1y5HHy/AJ5Gvfd7ji4f3Crk2LS7Ppg/Yj3pp4NaHgeNcQvx34PuS71hy3e1y5wuY X-Received: by 2002:aa7:d9d0:: with SMTP id v16mr15437501eds.104.1614007645403; Mon, 22 Feb 2021 07:27:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614007645; cv=none; d=google.com; s=arc-20160816; b=dgM9pxwstF5baXx16OnynoOO8rk0Zm51gnUTDQJs/j3/90ZCQUuC5+8Y+IKQSjhgMc DHEMvcA7hVuiyPrKs5WQE+aLo5VPt6b2JLLTIouyBUDJFw3VY7i56tm6xaKptEOyluXn kPmLU6IQLsMpaSWzH/hYO2mvney2YPL1SogMWASlBWN17i1xpgf45A50TvBvm+tC3zMB bbIvOTv2C8RtNsmJccM8i0MLHyzJ5Dyqg4CWd9i9Lo+XgJU+IRQXo9SI/BqQAwJSZv4b KTDRP3WhNUm5GaDAx3H+JpY6lNvmwYR7l+emc5xJLB4Yk5deb9UnRsAeFoXGp0d5A7AL UndQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject; bh=+oRqKzySTyZx4KdlGdTxAersYGktMBnPMiC1Tw460LA=; b=wQEtCLX4nmUWdINH17+Cp88By4010xIbUU2NeSykRnd1yqM4gDyLqjK0rVuVjjXXgI 66glDICJ/TWEwjsDkwkKEkKCDK1L1YhvHfZyZ9eAtLoims5pRjXRfdOskGnaKQjmcdaQ Xx5A8N52cHu+THaa7S4nWGolr3d+TSJayxRkmrIqjjeMWJnpa6+OjvJ0pbsEwrBgSZ2e cqvQNP3bt1j3hB1TU4vjg/s28KwsIhwIuNAOfu7YP8Nvxgr+E9yqvDKj8hE3GjqqafiJ 63C+wDexXnJ/3jm7NZkQR5Bc50lvFVGuHPGSTwbpS21vUHEFtwJMYnhyCjbK53e1C8Mp ZdDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fs18si2469995ejc.644.2021.02.22.07.27.01; Mon, 22 Feb 2021 07:27:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231645AbhBVPZx (ORCPT + 99 others); Mon, 22 Feb 2021 10:25:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:56666 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230475AbhBVPXv (ORCPT ); Mon, 22 Feb 2021 10:23:51 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5F41E64E24; Mon, 22 Feb 2021 15:23:08 +0000 (UTC) Subject: [PATCH v2 1/4] SUNRPC: Set rq_page_end differently From: Chuck Lever To: mgorman@techsingularity.net Cc: linux-nfs@vger.kernel.org, linux-mm@kvack.org, kuba@kernel.org Date: Mon, 22 Feb 2021 10:23:07 -0500 Message-ID: <161400738751.195066.16116692143291131918.stgit@klimt.1015granger.net> In-Reply-To: <161400722731.195066.9584156841718557193.stgit@klimt.1015granger.net> References: <161400722731.195066.9584156841718557193.stgit@klimt.1015granger.net> User-Agent: StGit/1.0-5-g755c MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org 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 --- 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 da8165bca0d5..819e46ab0a4a 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c @@ -686,8 +686,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;