All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anna Schumaker <anna@kernel.org>
To: linux-nfs@vger.kernel.org, trond.myklebust@hammerspace.com
Cc: anna@kernel.org
Subject: [PATCH 1/4] SUNRPC: Clean up unused variable in rpc_xprt_probe_trunked()
Date: Fri,  1 Dec 2023 16:15:46 -0500	[thread overview]
Message-ID: <20231201211549.126941-2-anna@kernel.org> (raw)
In-Reply-To: <20231201211549.126941-1-anna@kernel.org>

From: Anna Schumaker <Anna.Schumaker@Netapp.com>

We don't use the rpc_xprt_switch anywhere in this function, so let's not
take an extra reference to in unnecessarily.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
---
 net/sunrpc/clnt.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index daa9582ec861..4aa838543f79 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -3116,7 +3116,6 @@ static int rpc_xprt_probe_trunked(struct rpc_clnt *clnt,
 				  struct rpc_xprt *xprt,
 				  struct rpc_add_xprt_test *data)
 {
-	struct rpc_xprt_switch *xps;
 	struct rpc_xprt *main_xprt;
 	int status = 0;
 
@@ -3124,7 +3123,6 @@ static int rpc_xprt_probe_trunked(struct rpc_clnt *clnt,
 
 	rcu_read_lock();
 	main_xprt = xprt_get(rcu_dereference(clnt->cl_xprt));
-	xps = xprt_switch_get(rcu_dereference(clnt->cl_xpi.xpi_xpswitch));
 	status = rpc_cmp_addr_port((struct sockaddr *)&xprt->addr,
 				   (struct sockaddr *)&main_xprt->addr);
 	rcu_read_unlock();
@@ -3135,7 +3133,6 @@ static int rpc_xprt_probe_trunked(struct rpc_clnt *clnt,
 	status = rpc_clnt_add_xprt_helper(clnt, xprt, data);
 out:
 	xprt_put(xprt);
-	xprt_switch_put(xps);
 	return status;
 }
 
-- 
2.43.0


  reply	other threads:[~2023-12-01 21:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-01 21:15 [PATCH 0/4] SUNRPC: Various RCU fixes Anna Schumaker
2023-12-01 21:15 ` Anna Schumaker [this message]
2023-12-03 12:18   ` [PATCH 1/4] SUNRPC: Clean up unused variable in rpc_xprt_probe_trunked() Jeff Layton
2023-12-01 21:15 ` [PATCH 2/4] SUNRPC: Remove unused function rpc_clnt_xprt_switch_put() Anna Schumaker
2023-12-03 12:19   ` Jeff Layton
2023-12-01 21:15 ` [PATCH 3/4] SUNRPC: Create a helper function for accessing the rpc_clnt's xprt_switch Anna Schumaker
2023-12-03 12:24   ` Jeff Layton
2023-12-01 21:15 ` [PATCH 4/4] SUNRPC: Fix a suspicious RCU usage warning Anna Schumaker
2023-12-03 12:30   ` Jeff Layton
2023-12-04 17:00     ` Anna Schumaker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231201211549.126941-2-anna@kernel.org \
    --to=anna@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@hammerspace.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.