All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Danilo Krummrich" <dakr@kernel.org>
To: "Randy Dunlap" <rdunlap@infradead.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: Tue, 13 Oct 2026 00:37:10 +0200	[thread overview]
Message-ID: <DM37WR9GUVEO.1ZJWESPXVQ8X5@kernel.org> (raw)
In-Reply-To: <20261008171547.3084466-1-rdunlap@infradead.org>

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.

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.)

Thanks,
Danilo

      reply	other threads:[~2026-10-12 22:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08 17:15 [PATCH] debugfs: clarify return values when disabled Randy Dunlap
2026-10-12 22:37 ` Danilo Krummrich [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=DM37WR9GUVEO.1ZJWESPXVQ8X5@kernel.org \
    --to=dakr@kernel.org \
    --cc=corbet@lwn.net \
    --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=rdunlap@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.