[PATCH] cachefiles: Fix excess dput() after end_removing()

Marc Dionne marc.c.dionne at gmail.com
Wed Mar 25 05:57:06 PDT 2026


On Tue, Mar 24, 2026 at 7:50 PM David Howells <dhowells at redhat.com> wrote:
>
> David Howells <dhowells at redhat.com> wrote:
>
> > Fixes: 7bb1eb45e43c ("VFS: introduce start_removing_dentry()")
>
> Actually, this should probably be:
>
> Fixes: bd6ede8a06e8 ("VFS/nfsd/cachefiles/ovl: introduce start_removing() and end_removing()")

I think it is the correct Fixes tag, but I'm not sure that this is
actually the right fix.  7bb1eb45e43c switched other callers of
cachefiles_bury_object to use start_removing_dentry, which gets an
additional ref, and removed the extra dget from
cachefiles_bury_object.  In the cachefiles_cull case however, the
dentry is from start_removing and has a single ref on entry to
cachefiles_bury_object, which is an issue as "rep" may be used there
after end_removing may have put the last ref.  So the correct is
probably for cachefiles_cull to add a dget() before the call to
cachefiles_bury_object.

Marc



More information about the linux-afs mailing list