zero out delegation in the inode after it has been returned
diff mbox

Message ID 20110228213103.GA1256@merit.edu
State Rejected, archived
Headers show

Commit Message

Jim Rees Feb. 28, 2011, 9:31 p.m. UTC
None

Patch
diff mbox

diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index bbbc6bf..5bc4f7e 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -176,9 +176,11 @@  void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred,
 
 static int nfs_do_return_delegation(struct inode *inode, struct nfs_delegation *delegation, int issync)
 {
+	struct nfs_inode *nfsi = NFS_I(inode);
 	int res = 0;
 
 	res = nfs4_proc_delegreturn(inode, delegation->cred, &delegation->stateid, issync);
+	rcu_assign_pointer(nfsi->delegation, NULL);
 	nfs_free_delegation(delegation);
 	return res;
 }