[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YKUyAoBq/cepglmk@kroah.com>
Date: Wed, 19 May 2021 17:42:58 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Jeff Johnson <jjohnson@...eaurora.org>
Cc: linux-wireless@...r.kernel.org, Kalle Valo <kvalo@...eaurora.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Kees Cook <keescook@...omium.org>,
Jason Gunthorpe <jgg@...pe.ca>, Chao Yu <chao@...nel.org>,
Leon Romanovsky <leon@...nel.org>, b43-dev@...ts.infradead.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
jjohnson=codeaurora.org@...eaurora.org
Subject: Re: [PATCH v2] b43: don't save dentries for debugfs
On Wed, May 19, 2021 at 08:04:59AM -0700, Jeff Johnson wrote:
> On 2021-05-18 22:05, Greg Kroah-Hartman wrote:
> > On Tue, May 18, 2021 at 03:00:44PM -0700, Jeff Johnson wrote:
> > > On 2021-05-18 12:29, Jeff Johnson wrote:
> > > 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.
>
> I don't know the history but the relay documentation tells us:
> "If you want a directory structure to contain your relay files,
> you should create it using the host filesystem’s directory
> creation function, e.g. debugfs_create_dir()..."
>
> So my guess is that the original implementation followed that
> advice. I see 5 clients of this functionality, and all 5 pass a
> dentry returned from debugfs_create_dir():
>
> drivers/gpu/drm/i915/gt/uc/intel_guc_log.c, line 384
> drivers/net/wireless/ath/ath10k/spectral.c, line 534
> drivers/net/wireless/ath/ath11k/spectral.c, line 902
> drivers/net/wireless/ath/ath9k/common-spectral.c, line 1077
> kernel/trace/blktrace.c, line 549
Ah, that's just the "parent" dentry for the relayfs file. That's fine,
not a big deal, debugfs will always provide a way for you to get that if
needed.
thanks,
greg k-h
Powered by blists - more mailing lists