All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: NeilBrown <neil@brown.name>
Cc: Christian Brauner <brauner@kernel.org>,
	Amir Goldstein <amir73il@gmail.com>,
	Jeff Layton <jlayton@kernel.org>, Jan Kara <jack@suse.cz>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v3 6/6] debugfs: rename start_creating() to debugfs_start_creating()
Date: Fri, 19 Sep 2025 06:06:43 +0100	[thread overview]
Message-ID: <20250919050643.GI39973@ZenIV> (raw)
In-Reply-To: <20250915021504.2632889-7-neilb@ownmail.net>

On Mon, Sep 15, 2025 at 12:13:46PM +1000, NeilBrown wrote:
> From: NeilBrown <neil@brown.name>
> 
> start_creating() is a generic name which I would like to use for a
> function similar to simple_start_creating(), only not quite so simple.
> 
> debugfs is using this name which, though static, will cause complaints
> if then name is given a different signature in a header file.
> 
> So rename it to debugfs_start_creating().

FWIW, there's one thing that might conflict with.  Take a look at this
in 3 of 4 callers of that thing:

        dentry = start_creating(name, parent);
 
        if (IS_ERR(dentry))
                return dentry;
 
        if (!(debugfs_allow & DEBUGFS_ALLOW_API)) {
                failed_creating(dentry);
                return ERR_PTR(-EPERM);
        }

Now, note that the very first thing start_creating() does is

        if (!(debugfs_allow & DEBUGFS_ALLOW_API))  
                return ERR_PTR(-EPERM);

and that debugfs_allow is assign-once variable - it's set only debugfs_kernel(),
called only via
early_param("debugfs", debugfs_kernel);

So that's dead code and had always been such.  All those checks had been added
at the same point - in a24c6f7bc923 "debugfs: Add access restriction option",
so at a guess the dead ones are rudiments from an earlier version of that patch
that hadn't been taken out by an accident - they should've been taken out and
shot on review, really.

They obviously need to go and that'll be textually close enough to the calls of
start_creating() to cause conflicts.

  reply	other threads:[~2025-09-19  5:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-15  2:13 [PATCH v3 0/6] VFS: more prep for change to directory locking NeilBrown
2025-09-15  2:13 ` [PATCH v3 1/6] VFS/ovl: add lookup_one_positive_killable() NeilBrown
2025-09-15  2:13 ` [PATCH v3 2/6] VFS: discard err2 in filename_create() NeilBrown
2025-09-15  2:13 ` [PATCH v3 3/6] VFS: unify old_mnt_idmap and new_mnt_idmap in renamedata NeilBrown
2025-09-15  2:13 ` [PATCH v3 4/6] VFS/audit: introduce kern_path_parent() for audit NeilBrown
2025-09-15  2:13 ` [PATCH v3 5/6] VFS: rename kern_path_locked() and related functions NeilBrown
2025-09-21  9:43   ` kernel test robot
2025-09-21 10:22     ` NeilBrown
2025-09-15  2:13 ` [PATCH v3 6/6] debugfs: rename start_creating() to debugfs_start_creating() NeilBrown
2025-09-19  5:06   ` Al Viro [this message]
2025-09-19 22:49     ` NeilBrown

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=20250919050643.GI39973@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=amir73il@gmail.com \
    --cc=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=neil@brown.name \
    /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.