Skip to contentSkip to conversation

minor nfsd fixes

PATCH In review J. Bruce Fields 2 participants 4 messages Aug 12, 2021 – Aug 13, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover minor nfsd fixes

From: "J. Bruce Fields" <[email protected]>

These are two minor fixes I stumbled across while investigating other problems.

--b.

J. Bruce Fields (2):
rpc: fix gss_svc_init cleanup on failure
nfsd4: Fix forced-expiry locking

 fs/nfsd/nfs4state.c               | 4 ++--
 net/sunrpc/auth_gss/svcauth_gss.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.31.1
#1 lore raw

PATCH 1/2 rpc: fix gss_svc_init cleanup on failure

From: "J. Bruce Fields" <[email protected]>

The failure case here should be rare, but it's obviously wrong.

---
 net/sunrpc/auth_gss/svcauth_gss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/sunrpc/auth_gss/svcauth_gss.c +1 -1
index a81be45f40d9..3d685fe328fa 100644
@@ -1980,7 +1980,7 @@ gss_svc_init_net(struct net *net)
 		goto out2;
 	return 0;
 out2:
-	destroy_use_gss_proxy_proc_entry(net);
+	rsi_cache_destroy_net(net);
 out1:
 	rsc_cache_destroy_net(net);
 	return rv;
Signature · 1 line
2.31.1
#2 lore raw

PATCH 2/2 nfsd4: Fix forced-expiry locking

In reply to J. Bruce Fields

From: "J. Bruce Fields" <[email protected]>

This should use the network-namespace-wide client_lock, not the per-client cl_lock.

You shouldn't see any bugs unless you're actually using the forced-expiry interface introduced by 89c905beccbb.

Fixes 89c905beccbb "nfsd: allow forced expiration of NFSv4 clients"
---
 fs/nfsd/nfs4state.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/nfsd/nfs4state.c +2 -2
index 212f43fa5cba..1b6a7f48982e 100644
@@ -2687,9 +2687,9 @@ static void force_expire_client(struct nfs4_client *clp)
 
 	trace_nfsd_clid_admin_expired(&clp->cl_clientid);
 
-	spin_lock(&clp->cl_lock);
+	spin_lock(&nn->client_lock);
 	clp->cl_time = 0;
-	spin_unlock(&clp->cl_lock);
+	spin_unlock(&nn->client_lock);
 
 	wait_event(expiry_wq, atomic_read(&clp->cl_rpc_users) == 0);
 	spin_lock(&nn->client_lock);
Signature · 1 line
2.31.1
#3 lore raw
In reply to J. Bruce Fields

Hi Bruce-

Quoted 9 lines · J. Bruce Fields

From: "J. Bruce Fields" <[email protected]>

These are two minor fixes I stumbled across while investigating other problems.

--b.

Quoted 7 lines

J. Bruce Fields (2):
rpc: fix gss_svc_init cleanup on failure
nfsd4: Fix forced-expiry locking

fs/nfsd/nfs4state.c | 4 ++--
net/sunrpc/auth_gss/svcauth_gss.c | 2 +-

2 files changed, 3 insertions(+), 3 deletions(-)

I will merge these once my power and internet are back on.

--
Chuck Lever