Skip to content

Commit ecc8805

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 e1e5104 commit ecc8805

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
@@ -172,20 +172,9 @@ static int afs_dynroot_d_revalidate(struct dentry *dentry, unsigned int flags)
172172
return 1;
173173
}
174174

175-
/*
176-
* Allow the VFS to enquire as to whether a dentry should be unhashed (mustn't
177-
* sleep)
178-
* - called from dput() when d_count is going to 0.
179-
* - return 1 to request dentry be unhashed, 0 otherwise
180-
*/
181-
static int afs_dynroot_d_delete(const struct dentry *dentry)
182-
{
183-
return d_really_is_positive(dentry);
184-
}
185-
186175
const struct dentry_operations afs_dynroot_dentry_operations = {
187176
.d_revalidate = afs_dynroot_d_revalidate,
188-
.d_delete = afs_dynroot_d_delete,
177+
.d_delete = always_delete_dentry,
189178
.d_release = afs_d_release,
190179
.d_automount = afs_d_automount,
191180
};

0 commit comments

Comments
 (0)