diff options
author | David Howells <dhowells@redhat.com> | 2023-12-11 18:08:57 +0300 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2023-12-20 14:57:35 +0300 |
commit | 71f8b55bc30e82d6355e07811213d847981a32e2 (patch) | |
tree | 86537fc5b3cc1da7f5f081f5e49f41498b1aa1be /fs/afs/dynroot.c | |
parent | ceb6a6f023fd3e8b07761ed900352ef574010bcb (diff) | |
download | linux-71f8b55bc30e82d6355e07811213d847981a32e2.tar.xz |
afs: Fix the dynamic root's d_delete to always delete unused dentries
Fix the afs dynamic root's d_delete function to always delete unused
dentries rather than only deleting them if they're positive. With things
as they stand upstream, negative dentries stemming from failed DNS lookups
stick around preventing retries.
Fixes: 66c7e1d319a5 ("afs: Split the dynroot stuff out and give it its own ops tables")
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Markus Suvanto <markus.suvanto@gmail.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Diffstat (limited to 'fs/afs/dynroot.c')
-rw-r--r-- | fs/afs/dynroot.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/fs/afs/dynroot.c b/fs/afs/dynroot.c index 1fa8cf23bd36..34474a061654 100644 --- a/fs/afs/dynroot.c +++ b/fs/afs/dynroot.c @@ -252,20 +252,9 @@ static int afs_dynroot_d_revalidate(struct dentry *dentry, unsigned int flags) return 1; } -/* - * Allow the VFS to enquire as to whether a dentry should be unhashed (mustn't - * sleep) - * - called from dput() when d_count is going to 0. - * - return 1 to request dentry be unhashed, 0 otherwise - */ -static int afs_dynroot_d_delete(const struct dentry *dentry) -{ - return d_really_is_positive(dentry); -} - const struct dentry_operations afs_dynroot_dentry_operations = { .d_revalidate = afs_dynroot_d_revalidate, - .d_delete = afs_dynroot_d_delete, + .d_delete = always_delete_dentry, .d_release = afs_d_release, .d_automount = afs_d_automount, }; |