Re: [PATCH v2] xattrat: accept empty O_PATH file descriptors

Christian Brauner <[email protected]> Fri, 31 Jul 2026 15:26:08 +0200
Newsgroups org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel
Message-ID <20260731-rustikal-revidieren-parolen-02b3e749e9cb@brauner>
On 2026-07-30 22:34 +0200, Andreas Gruenbacher wrote:
> On Thu, Jul 30, 2026 at 8:49 PM Christian Brauner <[email protected]> wrote:
> > On 2026-07-22 17:10 +0200, Andreas Gruenbacher wrote:
> > > Christian,
> > >
> > > here's an updated patch for making the *xattrat() system calls accept
> > > O_PATH file descriptors.
> > >
> > > Compared to the previous version (see the discussion at [*]), this
> > > version adds a fd_maybe_raw cleanup class that uses either fdget() or
> > > fdget_raw() depending on which kinds of file descriptors are acceptable.
> > > That's still a but ugly, but all the alternatives I could come up with
> > > are much worse.
> > >
> > > [*] https://lore.kernel.org/linux-fsdevel/[email protected]/
> >
> > Thank you. How do you feel about?
> 
> I don't think it's an improvement; see below.

Do you see other users outside of fs/xattr.c that would use this new fd
class. If not it might be useful to just have a local version of this in
fs/xattr.c?