aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/unlink.c
diff options
context:
space:
mode:
authorLance Shelton <lance.shelton@primarydata.com>2024-06-16 21:21:36 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2024-07-08 13:47:26 -0400
commitadb4b42d19aea91826621a8d0bac94cf2c08f8bc (patch)
treedc80867cad0e7e676cf6bfe4582bde88c5b6d024 /fs/nfs/unlink.c
parentd79ed371d51c57b2af74781466f1c0e821964b48 (diff)
Return the delegation when deleting sillyrenamed files
Add a callback to return the delegation in order to allow generic NFS code to return the delegation when appropriate. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Lance Shelton <lance.shelton@hammerspace.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/unlink.c')
-rw-r--r--fs/nfs/unlink.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c
index 0110299643a2..bf77399696a7 100644
--- a/fs/nfs/unlink.c
+++ b/fs/nfs/unlink.c
@@ -232,6 +232,8 @@ nfs_complete_unlink(struct dentry *dentry, struct inode *inode)
dentry->d_fsdata = NULL;
spin_unlock(&dentry->d_lock);
+ NFS_PROTO(inode)->return_delegation(inode);
+
if (NFS_STALE(inode) || !nfs_call_unlink(dentry, inode, data))
nfs_free_unlinkdata(data);
}