From: Greg Kroah-Hartman <gregkh@linuxfoundation•org>
To: Jeff Johnson <jjohnson@codeaurora•org>
Cc: linux-wireless@vger•kernel.org, Kalle Valo <kvalo@codeaurora•org>,
"David S. Miller" <davem@davemloft•net>,
Jakub Kicinski <kuba@kernel•org>,
Kees Cook <keescook@chromium•org>, Jason Gunthorpe <jgg@ziepe•ca>,
Chao Yu <chao@kernel•org>, Leon Romanovsky <leon@kernel•org>,
b43-dev@lists•infradead.org, netdev@vger•kernel.org,
linux-kernel@vger•kernel.org,
jjohnson=codeaurora.org@codeaurora•org
Subject: Re: [PATCH v2] b43: don't save dentries for debugfs
Date: Wed, 19 May 2021 17:42:58 +0200 [thread overview]
Message-ID: <YKUyAoBq/cepglmk@kroah.com> (raw)
In-Reply-To: <2eb3af43025436c0832c8f61fbf519ad@codeaurora.org>
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
next prev parent reply other threads:[~2021-05-19 15:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 16:33 [PATCH v2] b43: don't save dentries for debugfs Greg Kroah-Hartman
2021-05-18 17:47 ` Kalle Valo
2021-05-21 18:44 ` Greg Kroah-Hartman
2021-05-18 19:29 ` Jeff Johnson
2021-05-18 22:00 ` Jeff Johnson
2021-05-19 5:05 ` Greg Kroah-Hartman
2021-05-19 15:04 ` Jeff Johnson
2021-05-19 15:42 ` Greg Kroah-Hartman [this message]
2021-05-19 15:57 ` Jeff Johnson
2021-05-19 16:03 ` Greg Kroah-Hartman
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=YKUyAoBq/cepglmk@kroah.com \
--to=gregkh@linuxfoundation$(echo .)org \
--cc=b43-dev@lists$(echo .)infradead.org \
--cc=chao@kernel$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=jgg@ziepe$(echo .)ca \
--cc=jjohnson=codeaurora.org@codeaurora$(echo .)org \
--cc=jjohnson@codeaurora$(echo .)org \
--cc=keescook@chromium$(echo .)org \
--cc=kuba@kernel$(echo .)org \
--cc=kvalo@codeaurora$(echo .)org \
--cc=leon@kernel$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-wireless@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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