Re: [RFC PATCH 0/6] debugfs: Replace dentry with an opaque handle in debugfs API
From: Al Viro
Date: Mon Feb 10 2025 - 00:53:55 EST
On Sun, Feb 09, 2025 at 09:20:20PM -0800, David Reaver wrote:
> Overview
> ========
>
> This patch series replaces raw dentry pointers in the debugfs API with
> an opaque wrapper struct:
>
> struct debugfs_node {
> struct dentry dentry;
> };
>
> Intermediate commits rely on "#define debugfs_node dentry" to migrate
> debugfs users without breaking the build. The final commit introduces
> the struct and updates debugfs internals accordingly.
>
> Why an RFC?
> ===========
>
> This is a large change, and I expect a few iterations -- unless this
> entire approach is NACKed of course :) Any advice is appreciated, and
> I'm particularly looking for feedback on the following:
Do not embed struct dentry into anything else.
Do not take over its lifetime rules.
For the record:
Anything of that sort is going to be vetoed.