From: Al Viro <viro@zeniv.linux.org.uk>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux trace kernel <linux-trace-kernel@vger.kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Subject: Re: [PATCH] tracefs: Add d_delete to remove negative dentries
Date: Wed, 11 Jun 2025 18:37:02 +0100 [thread overview]
Message-ID: <20250611173702.GL299672@ZenIV> (raw)
In-Reply-To: <20250611121815.409d02f8@batman.local.home>
On Wed, Jun 11, 2025 at 12:18:15PM -0400, Steven Rostedt wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
>
> If a lookup in tracefs is done on a file that does not exist, it leaves a
> dentry hanging around until memory pressure removes it. But eventfs
> dentries should hang around as when their ref count goes to zero, it
> requires more work to recreate it. For the rest of the tracefs dentries,
> they hang around as their dentry is used as a descriptor for the tracing
> system. But if a file lookup happens for a file in tracefs that does not
> exist, it should be deleted.
>
> Add a .d_delete callback that checks if dentry->fsdata is set or not. Only
> eventfs dentries set fsdata so if it has content it should not be deleted
> and should hang around in the cache.
>
> Reported-by: Al Viro <viro@zeniv.linux.org.uk>
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Applied to #work.dcache
prev parent reply other threads:[~2025-06-11 17:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-11 16:18 [PATCH] tracefs: Add d_delete to remove negative dentries Steven Rostedt
2025-06-11 17:37 ` Al Viro [this message]
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=20250611173702.GL299672@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
/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