NFSv4: Return delegations synchronously in evict_inode
authorTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 25 Mar 2015 17:19:42 +0000 (13:19 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 27 Mar 2015 16:24:36 +0000 (12:24 -0400)
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

index a6ad688658803424d726afae85597ad2ace80044..08c6244487501ff5a703083131101d1282f8800c 100644 (file)
@@ -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);
 }
 
 /**