From: Paulo Alcantara <pc@manguebit.org>
To: NeilBrown <neil@brown.name>,
Christian Brauner <brauner@kernel.org>,
David Howells <dhowells@redhat.com>
Cc: Marc Dionne <marc.dionne@auristor.com>,
netfs@lists.linux.dev, linux-afs@lists.infradead.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cachefiles: fix incorrect dentry refcount in cachefiles_cull()
Date: Thu, 26 Mar 2026 20:16:14 -0300 [thread overview]
Message-ID: <60e35d05911d01bbb31449682c525f5c@manguebit.org> (raw)
In-Reply-To: <177456350181.1851489.16359967086642190170@noble.neil.brown.name>
NeilBrown <neilb@ownmail.net> writes:
> The patch mentioned below changed cachefiles_bury_object() to expect 2
> references to the 'rep' dentry. Three of the callers were changed to
> use start_removing_dentry() which takes an extra reference so in those
> cases the call gets the expected references.
>
> However there is another call to cachefiles_bury_object() in
> cachefiles_cull() which did not need to be changed to use
> start_removing_dentry() and so was not properly considered.
> It still passed the dentry with just one reference so the net result is
> that a reference is lost.
>
> To meet the expectations of cachefiles_bury_object(), cachefiles_cull()
> must take an extra reference before the call. It will be dropped by
> cachefiles_bury_object().
>
> Reported-by: Marc Dionne <marc.dionne@auristor.com>
> Fixes: 7bb1eb45e43c ("VFS: introduce start_removing_dentry()")
> Signed-off-by: NeilBrown <neil@brown.name>
> ---
> fs/cachefiles/namei.c | 5 +++++
> 1 file changed, 5 insertions(+)
Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
next prev parent reply other threads:[~2026-03-26 23:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 22:18 NeilBrown
2026-03-26 23:16 ` Paulo Alcantara [this message]
2026-03-31 9:52 ` Christian Brauner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=60e35d05911d01bbb31449682c525f5c@manguebit.org \
--to=pc@manguebit.org \
--cc=brauner@kernel.org \
--cc=dhowells@redhat.com \
--cc=linux-afs@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.dionne@auristor.com \
--cc=neil@brown.name \
--cc=netfs@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®