Re: VFS minor improvements policy
From: Jori Koolstra
Date: Wed Mar 18 2026 - 16:59:26 EST
> >
> > On Sat 14-03-26 14:24:23, Jori Koolstra wrote:
> > > I submitted a patch a few days ago about fixing the docstring of
> > > hash_name(). This is not a reminder of that patch, but today I came
> > > across something else in the VFS code, while trying to implement a
> > > mkdirat_fd syscall, that I thought might be slightly improved. We have
> > > this anonymous enum:
> > >
> > > enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT};
> > >
> > > but it is also used as an out parameter in filename_parentat() through
> > > int *type. Now you have to look up what this int might hold, so I wonder
> > > should this struct not have an explicit type that filename_parentat()
> > > uses?
> >
> > I guess this is a bit matter of personal preference. I personally would
> > prefer explicitely named enum in this case and use it where appropriate but
>
> Me too and it should be cleaned up imho.
>
I can send it in you like. I have also been working on trying to get re-open
masks work for O_PATH fds. It is easy for the OPENAT2_EMPTY_PATH case, but for
procfs magic links we might have to pass some state through nd_jump_link, so that
the nd is aware what the final open flag mask is. But I have to study the code a
bit more.
Best,
Jori.