Skip to content

Commit 71f8b55

Browse files
committed
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: 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]
1 parent ceb6a6f commit 71f8b55

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

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

0 commit comments

Comments
 (0)