From: Randy Dunlap <rdunlap@infradead.org>
To: Danilo Krummrich <dakr@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
driver-core@lists.linux.dev, Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
linux-doc@vger.kernel.org, Johan Hovold <johan@kernel.org>
Subject: Re: [PATCH] debugfs: clarify return values when disabled
Date: Mon, 19 Oct 2026 15:01:43 -0700 [thread overview]
Message-ID: <7ae2c0f8-4c8e-4cf0-ba51-92b48835838d@infradead.org> (raw)
In-Reply-To: <DM37WR9GUVEO.1ZJWESPXVQ8X5@kernel.org>
On 10/12/26 3:37 PM, Danilo Krummrich wrote:
> On Thu Oct 8, 2026 at 7:15 PM CEST, Randy Dunlap wrote:
>> @@ -820,6 +826,10 @@ EXPORT_SYMBOL_GPL(debugfs_lookup_and_rem
>> *
>> * If debugfs is not enabled in the kernel, the value -%ENODEV will be
>> * returned.
>> + * If debugfs is not enabled in the kernel build, the value %-ENODEV
>> + * will be returned. If debugfs is enabled in the kernel build but is disabled
>> + * by using "debugfs=off" on the kernel command line, the value %-EPERM
>> + * will be returned.
>
> This keeps the old *and* the new text.
Thanks for catching that one.
> Besides that, when debugfs is disabled via kernel command line
> debugfs_change_name() checks
>
> if (IS_ERR_OR_NULL(dentry))
> return 0;
>
> and if disabled via kernel command line dentry would have been an ERR_PTR and
> hence it would just return 0.
>
> (There may be more functions of this sort, I didn't check all of them.)
Yes, I'll check all of the exported functions for similar handling.
--
~Randy
prev parent reply other threads:[~2026-10-19 22:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 17:15 Randy Dunlap
2026-10-12 22:37 ` Danilo Krummrich
2026-10-19 22:01 ` Randy Dunlap [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=7ae2c0f8-4c8e-4cf0-ba51-92b48835838d@infradead.org \
--to=rdunlap@infradead.org \
--cc=corbet@lwn.net \
--cc=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=skhan@linuxfoundation.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
all inboxes | Powered by JetHome®