Skip to content

Commit 65d2c28

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 <[email protected]> Tested-by: Markus Suvanto <[email protected]> cc: Marc Dionne <[email protected]> cc: [email protected] Signed-off-by: Sasha Levin <[email protected]>
1 parent a321831 commit 65d2c28

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
@@ -251,20 +251,9 @@ static int afs_dynroot_d_revalidate(struct dentry *dentry, unsigned int flags)
251251
return 1;
252252
}
253253

254-
/*
255-
* Allow the VFS to enquire as to whether a dentry should be unhashed (mustn't
256-
* sleep)
257-
* - called from dput() when d_count is going to 0.
258-
* - return 1 to request dentry be unhashed, 0 otherwise
259-
*/
260-
static int afs_dynroot_d_delete(const struct dentry *dentry)
261-
{
262-
return d_really_is_positive(dentry);
263-
}
264-
265254
const struct dentry_operations afs_dynroot_dentry_operations = {
266255
.d_revalidate = afs_dynroot_d_revalidate,
267-
.d_delete = afs_dynroot_d_delete,
256+
.d_delete = always_delete_dentry,
268257
.d_release = afs_d_release,
269258
.d_automount = afs_d_automount,
270259
};

0 commit comments

Comments
 (0)