lkml.org 
[lkml]   [2021]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] b43: don't save dentries for debugfs
On Tue, May 18, 2021 at 03:00:44PM -0700, Jeff Johnson wrote:
> On 2021-05-18 12:29, Jeff Johnson wrote:
> > On 2021-05-18 09:33, Greg Kroah-Hartman wrote:
> > > There is no need to keep around the dentry pointers for the debugfs
> > > files as they will all be automatically removed when the subdir is
> > > removed. So save the space and logic involved in keeping them
> > > around by
> > > just getting rid of them entirely.
> > >
> > > By doing this change, we remove one of the last in-kernel user that
> > > was
> > > storing the result of debugfs_create_bool(), so that api can be
> > > cleaned
> > > up.
> >
> > Question not about this specific change, but the general concept
> > of keeping (or not keeping) dentry pointers. In the ath drivers,
> > as well as in an out-of-tree driver for Android, we keep a
> > debugfs dentry pointer to use as a param to relay_open().
> >
> > Will we still be able to have a dentry pointer for this purpose?
> > Or better, is there a recommended way to get a dentry pointer
> > NOT associated with debugfs at all (which would be ideal for
> > Android where debugfs is disabled).
>
> Answering one of my questions: The dentry passed to relay_open() comes
> from debugfs_create_dir() which is expected to return a dentry.
>
> Would still like guidance on if there is a recommended way to get a
> dentry not associated with debugfs.

What do you exactly mean by "not associated with debugfs"?

And why are you passing a debugfs dentry to relay_open()? That feels
really wrong and fragile.

Ideally I want to get rid of the "raw" dentry that debugfs returns to
callers, as it has caused odd problems in the past, but that's a very
long-term project...

thanks,

greg k-h

\
 
 \ /
  Last update: 2021-05-19 07:05    [W:0.057 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site