From: Jori Koolstra <jkoolstra@xs4all.nl>
To: Amir Goldstein <amir73il@gmail.com>
Cc: gregkh@linuxfoundation.org,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
NeilBrown <neil@brown.name>, Jeff Layton <jlayton@kernel.org>,
Namjae Jeon <linkinjeon@kernel.org>,
Mateusz Guzik <mjguzik@gmail.com>,
"open list:FILESYSTEMS (VFS and infrastructure)"
<linux-fsdevel@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] vfs: replace ints with enum component_type for LAST_XXX
Date: Wed, 1 Apr 2026 12:37:42 +0200 (CEST) [thread overview]
Message-ID: <842453183.787323.1775039862978@kpc.webmail.kpnmail.nl> (raw)
In-Reply-To: <CAOQ4uxj_sH3Owh2_UEHXGY81B3yoZzLF0DWZm9OPCPOiLrzL9A@mail.gmail.com>
> Op 01-04-2026 10:29 CEST schreef Amir Goldstein <amir73il@gmail.com>:
>
> > diff --git a/include/linux/namei.h b/include/linux/namei.h
> > index 58600cf234bc..e79ff97063e9 100644
> > --- a/include/linux/namei.h
> > +++ b/include/linux/namei.h
> > @@ -16,7 +16,7 @@ enum { MAX_NESTED_LINKS = 8 };
> > /*
> > * Type of the last component on LOOKUP_PARENT
> > */
> > -enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT};
> > +enum component_type {NORMAL, ROOT, DOT, DOTDOT};
> >
>
> Nah, I don't think it is a good idea to poluate the global namespace
> with constant as generic as NORMAL, ROOT
Fair enough. I thought also maybe we can keep this purely internal to namei.c,
but it turns out there is one user that I missed in fs/smb/server/vfs.c, so that
one has to be converted still as well.
>
> At the very least this needs a namespace prefix such as
> NDT_ (nameidata type)
>
Maybe I would prefer COMPONENT_XXX.
> But then I don't think it is worth the churn to rename LAST_ to NDT_
> so I would drop the constants name change altogether.
>
I mean if we are going to use a separate type for this might as well clean up
the semantics a bit. But I would be fine with keeping LAST_XXX as well.
> Thanks,
> Amir.
Thanks,
Jori.
next prev parent reply other threads:[~2026-04-01 10:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 17:37 Jori Koolstra
2026-03-31 21:21 ` Jan Kara
2026-04-01 8:29 ` Amir Goldstein
2026-04-01 10:37 ` Jori Koolstra [this message]
2026-04-01 14:32 ` Amir Goldstein
2026-04-02 6:25 ` kernel test robot
2026-04-02 6:25 ` kernel test robot
2026-04-02 9:12 ` Jori Koolstra
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=842453183.787323.1775039862978@kpc.webmail.kpnmail.nl \
--to=jkoolstra@xs4all.nl \
--cc=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jack@suse.cz \
--cc=jlayton@kernel.org \
--cc=linkinjeon@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjguzik@gmail.com \
--cc=neil@brown.name \
--cc=viro@zeniv.linux.org.uk \
/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®