Re: [PATCH RFC POC 00/50] file: handle files on syscall exit
From: Christian Brauner
Date: Wed Sep 16 2026 - 03:17:13 EST
On Tue, Sep 15, 2026 at 09:02:31AM -0700, Linus Torvalds wrote:
> On Tue, 15 Sept 2026 at 04:31, Christian Brauner <brauner@xxxxxxxxxx> wrote:
> >
> > TL;DR, this lets arch code handle fd install and cleanup. fd_prepare()
> > allocates a descriptor like get_unused_fd_flags() does and records it in
> > a slot on the task. fd_stage() attaches the file to that slot and
> > returns the number.
>
> Honestly, I am *not* a fan. At all.
I'm really glad that you don't like it! I hate it too.
To quote back from the cover letter:
> The idea in this series is old-ish and really never let go of me and so
> I wanted to at least dump it onto the list once even if it's just for
> illustrative purposes.
I think the cleanup-based solution we've added a couple of releases ago
is the better appraoch. Which is why I chose it over this.
But this install-on-the-way-out idea has been brought up quite a few
times as the "better approach". I never really believed it would work
nicely. Now we have an implementation on the list that we can point to
and we can move on from this.