diff mbox series

NFS: Cleanup unused rpc_clnt variable

Message ID 7b299fff0277489fd6f8a12d377fb3edc5fb3a80.1682007300.git.bcodding@redhat.com (mailing list archive)
State New, archived
Headers show
Series NFS: Cleanup unused rpc_clnt variable | expand

Commit Message

Benjamin Coddington April 20, 2023, 4:17 p.m. UTC
The root rpc_clnt is not used here, clean it up.

Fixes: 4dc73c679114 ("NFSv4: keep state manager thread active if swap is enabled")
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
---
 fs/nfs/nfs4state.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

NeilBrown April 20, 2023, 9:51 p.m. UTC | #1
On Fri, 21 Apr 2023, Benjamin Coddington wrote:
> The root rpc_clnt is not used here, clean it up.

True.  The actions on rpc_clnt happen in nfs4_run_state_manager, not
here.  So this is not needed.  Thanks.

> 
> Fixes: 4dc73c679114 ("NFSv4: keep state manager thread active if swap is enabled")
> Signed-off-by: Benjamin Coddington <bcodding@redhat.com>

Reviewed-by: NeilBrown <neilb@suse.de>

Thanks,
NeilBrown


> ---
>  fs/nfs/nfs4state.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
> index 2a0ca5c7f082..f8afd75e520d 100644
> --- a/fs/nfs/nfs4state.c
> +++ b/fs/nfs/nfs4state.c
> @@ -1205,10 +1205,6 @@ void nfs4_schedule_state_manager(struct nfs_client *clp)
>  {
>  	struct task_struct *task;
>  	char buf[INET6_ADDRSTRLEN + sizeof("-manager") + 1];
> -	struct rpc_clnt *cl = clp->cl_rpcclient;
> -
> -	while (cl != cl->cl_parent)
> -		cl = cl->cl_parent;
>  
>  	set_bit(NFS4CLNT_RUN_MANAGER, &clp->cl_state);
>  	if (test_and_set_bit(NFS4CLNT_MANAGER_AVAILABLE, &clp->cl_state) != 0) {
> -- 
> 2.39.2
> 
>
diff mbox series

Patch

diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 2a0ca5c7f082..f8afd75e520d 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1205,10 +1205,6 @@  void nfs4_schedule_state_manager(struct nfs_client *clp)
 {
 	struct task_struct *task;
 	char buf[INET6_ADDRSTRLEN + sizeof("-manager") + 1];
-	struct rpc_clnt *cl = clp->cl_rpcclient;
-
-	while (cl != cl->cl_parent)
-		cl = cl->cl_parent;
 
 	set_bit(NFS4CLNT_RUN_MANAGER, &clp->cl_state);
 	if (test_and_set_bit(NFS4CLNT_MANAGER_AVAILABLE, &clp->cl_state) != 0) {