diff options
| author | Christian Brauner <brauner@kernel.org> | 2026-09-23 09:28:02 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-09-23 09:28:02 +0200 |
| commit | fae37d5e3c4e94aef334825ab89f66efcfe489b2 (patch) | |
| tree | 9bb168a6f89471f26618eecc9e1fe0209bd65d7d /tools/lib/python | |
| parent | 07d35cec28c6a33d7714da6eebcf5c69644f530e (diff) | |
| parent | 64cbb36448ff22ce8400744e296888efef1d1c04 (diff) | |
| download | linux-next-fae37d5e3c4e94aef334825ab89f66efcfe489b2.tar.gz linux-next-fae37d5e3c4e94aef334825ab89f66efcfe489b2.zip | |
Merge patch series "file: simplify and harden cleanup handling"
Christian Brauner <brauner@kernel.org> says:
The cleanup guards rely on unnecessary infrastructure and make the code
more complicated to follow than it needs to be. Clean it up. Also shrink
the struct a bit and get rid of the unnecessary error variable. We can
just make this more ergonomic by using fdf->fd directly. Also expose the
struct itself as const and hide the actual underlying local variable
behind a UNIQUE_ID() named variable so we avoid risking shadow variables
and polluting callsites. Code generation wise the outcome is exactly the
same but simpler.
* patches from https://patch.msgid.link/20260917-work-file-fd_prepare-v1-0-b87534ca49f3@kernel.org:
file: make struct fd_prepare const and kill its err field
cleanup: remove CLASS_INIT()
file: declare the FD_PREPARE() variable with __cleanup() directly
file: simplify FD_PREPARE()
Link: https://patch.msgid.link/20260917-work-file-fd_prepare-v1-0-b87534ca49f3@kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
