aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/delegation.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2019-10-21 14:04:00 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2019-11-03 21:28:45 -0500
commitb47e0e478c494a5e276f7d9b455b0f26bf33fc9c (patch)
tree1d7f7f8478d851c41e68c99407519a4b9990f766 /fs/nfs/delegation.c
parentNFSv4: fail nfs4_refresh_delegation_stateid() when the delegation was revoked (diff)
downloadlinux-dev-b47e0e478c494a5e276f7d9b455b0f26bf33fc9c.tar.xz
linux-dev-b47e0e478c494a5e276f7d9b455b0f26bf33fc9c.zip
NFS: Rename nfs_inode_return_delegation_noreclaim()
Rename nfs_inode_return_delegation_noreclaim() to nfs_inode_evict_delegation(), which better describes what it does. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/delegation.c')
-rw-r--r--fs/nfs/delegation.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index 630167e243be..0c9339d559f5 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -585,19 +585,22 @@ restart:
}
/**
- * nfs_inode_return_delegation_noreclaim - return delegation, don't reclaim opens
+ * nfs_inode_evict_delegation - return delegation, don't reclaim opens
* @inode: inode to process
*
* Does not protect against delegation reclaims, therefore really only safe
- * to be called from nfs4_clear_inode().
+ * to be called from nfs4_clear_inode(). Guaranteed to always free
+ * the delegation structure.
*/
-void nfs_inode_return_delegation_noreclaim(struct inode *inode)
+void nfs_inode_evict_delegation(struct inode *inode)
{
struct nfs_delegation *delegation;
delegation = nfs_inode_detach_delegation(inode);
- if (delegation != NULL)
+ if (delegation != NULL) {
+ set_bit(NFS_DELEGATION_INODE_FREEING, &delegation->flags);
nfs_do_return_delegation(inode, delegation, 1);
+ }
}
/**