Re: [PATCH RFC POC 25/50] file: reimplement FD_PREPARE() on the deferred fd_prepare() path
From: sashiko-bot
Date: Tue Sep 15 2026 - 09:45:39 EST
> The FD_PREPARE() cleanup class allocated and installed immediately and
> required fd_publish() to be the last thing that could fail. Reimplement
> it on the deferred path. FD_PREPARE() reserves a slot with fd_prepare()
> and stages the file on it. The syscall exit installs on success and
> drops on error. fd_prepare_fd() and fd_prepare_file() now read the slot.
> fd_publish() is gone.
>
> Convert every FD_PREPARE() user since fdf.err can now become a simple
> IS_ERR(fdf).
>
> Signed-off-by: Christian Brauner (Amutable) <brauner@xxxxxxxxxx>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260915-work-fd-reserve-unify-folded-v1-0-4d5217d6b246@xxxxxxxxxx?part=25