diff mbox

NFSv4: Return delegations synchronously in evict_inode

Message ID 1427475157-13904-1-git-send-email-trond.myklebust@primarydata.com (mailing list archive)
State New, archived
Headers show

Commit Message

Trond Myklebust March 27, 2015, 4:52 p.m. UTC
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.

Reported-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
---
 fs/nfs/delegation.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kinglong Mee March 28, 2015, 1:50 p.m. UTC | #1
On 2015/3/28 0:52, Trond Myklebust wrote:
> 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.
> 
> Reported-by: Kinglong Mee <kinglongmee@gmail.com>
> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>

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

Tested-by: Kinglong Mee <kinglongmee@gmail.com>

thanks,
Kinglong Mee

> ---
>  fs/nfs/delegation.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
> index a6ad68865880..08c624448750 100644
> --- a/fs/nfs/delegation.c
> +++ b/fs/nfs/delegation.c
> @@ -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);
>  }
>  
>  /**
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index a6ad68865880..08c624448750 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -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);
 }
 
 /**