Skip to content

Commit 82d64cb

Browse files
dhowellsgregkh
authored andcommitted
afs: Fix the dynamic root's d_delete to always delete unused dentries
[ Upstream commit 71f8b55 ] 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: 66c7e1d ("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 Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 2b4600f commit 82d64cb

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

fs/afs/dynroot.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -163,20 +163,9 @@ static int afs_dynroot_d_revalidate(struct dentry *dentry, unsigned int flags)
163163
return 1;
164164
}
165165

166-
/*
167-
* Allow the VFS to enquire as to whether a dentry should be unhashed (mustn't
168-
* sleep)
169-
* - called from dput() when d_count is going to 0.
170-
* - return 1 to request dentry be unhashed, 0 otherwise
171-
*/
172-
static int afs_dynroot_d_delete(const struct dentry *dentry)
173-
{
174-
return d_really_is_positive(dentry);
175-
}
176-
177166
const struct dentry_operations afs_dynroot_dentry_operations = {
178167
.d_revalidate = afs_dynroot_d_revalidate,
179-
.d_delete = afs_dynroot_d_delete,
168+
.d_delete = always_delete_dentry,
180169
.d_release = afs_d_release,
181170
.d_automount = afs_d_automount,
182171
};

0 commit comments

Comments
 (0)