Skip to contentSkip to conversation

NFSv4: Return delegations synchronously in evict_inode

PATCH In review Trond Myklebust 2 participants 2 messages Mar 27, 2015 – Mar 28, 2015

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

PATCH 1/1 NFSv4: Return delegations synchronously in evict_inode

Kinglong Mee reports that asynchronous delegations are being killed by the call to rpc_shutdown_client() when unmounting. This can lead to state leakage on the server until the client lease expires.

---
 fs/nfs/delegation.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/delegation.c +1 -1
index a6ad68865880..08c624448750 100644
@@ -514,7 +514,7 @@ void nfs_inode_return_delegation_noreclaim(struct inode *inode)
 
 	delegation = nfs_inode_detach_delegation(inode);
 	if (delegation != NULL)
-		nfs_do_return_delegation(inode, delegation, 0);
+		nfs_do_return_delegation(inode, delegation, 1);
 }
 
 /**
Signature · 1 line
2.1.0
Tested-by on v1 1/1
#1 lore raw
Quoted 6 lines · Trond Myklebust

Kinglong Mee reports that asynchronous delegations are being killed by the call to rpc_shutdown_client() when unmounting. This can lead to state leakage on the server until the client lease expires.

With this patch, client can return delegation, destroy session and client id correctly. I'd like it.

thanks,
Kinglong Mee

Quoted 18 lines
---
 fs/nfs/delegation.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/delegation.c +1 -1
index a6ad68865880..08c624448750 100644
@@ -514,7 +514,7 @@ void nfs_inode_return_delegation_noreclaim(struct inode *inode)
 
 	delegation = nfs_inode_detach_delegation(inode);
 	if (delegation != NULL)
-		nfs_do_return_delegation(inode, delegation, 0);
+		nfs_do_return_delegation(inode, delegation, 1);
 }
 
 /**