Christian Brauner
b19e5e4921
sd-device: add device_open() which always sets O_CLOEXEC
...
sd_device_open() is public API and keeps returning non-cloexec fds
unless the caller passes O_CLOEXEC. So every internal caller has to
remember to pass it and storage-block.c didn't, so the block device fds
it opens aren't O_CLOEXEC.
Move the open logic into device_open() which always sets O_CLOEXEC, like
our other open helpers do, and turn sd_device_open() into a wrapper that
clears it again if the caller didn't ask for it. Use device_open() for
all internal callers, which also makes device_open_from_devnum() set
O_CLOEXEC on its own, and drop O_CLOEXEC from all the callers.
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org >
2026-11-02 09:21:12 +01:00
..
2026-11-02 09:21:11 +01:00
2026-11-02 09:21:11 +01:00
2026-10-31 04:55:16 +09:00
2026-11-02 09:21:11 +01:00
2026-10-30 13:37:06 +01:00
2026-11-02 09:21:11 +01:00
2026-10-30 13:37:06 +01:00
2026-11-02 09:21:11 +01:00
2026-11-02 09:21:11 +01:00
2026-10-30 13:37:06 +01:00
2025-07-11 13:05:42 +09:00
2025-07-11 13:05:42 +09:00
2026-10-21 22:14:11 +02:00
2025-05-21 23:57:31 +09:00
2026-10-30 13:37:06 +01:00
2026-07-13 12:18:49 +08:00
2025-04-18 14:19:15 +02:00
2026-10-30 13:37:06 +01:00
2026-10-30 13:37:06 +01:00
2026-10-30 13:37:06 +01:00
2026-11-02 09:21:12 +01:00
2026-11-02 09:21:11 +01:00
2026-03-05 10:27:58 +01:00
2025-05-21 23:57:31 +09:00
2026-05-27 04:04:47 +09:00
2026-11-02 09:21:12 +01:00
2026-11-02 09:21:12 +01:00
2025-12-15 08:50:13 +09:00
2025-05-21 23:57:31 +09:00
2026-10-30 13:37:06 +01:00
2025-12-10 18:59:44 +09:00
2026-08-03 13:54:17 +09:00
2026-05-27 04:04:47 +09:00
2026-11-02 09:21:12 +01:00
2026-11-02 09:21:11 +01:00
2026-10-30 13:37:06 +01:00
2026-03-04 08:28:29 +01:00
2026-08-29 07:40:35 +09:00
2025-05-21 23:57:31 +09:00
2026-03-04 08:28:29 +01:00
2026-10-12 03:36:56 +09:00
2025-05-21 23:57:31 +09:00
2026-02-23 05:46:42 +09:00
2025-10-17 21:11:23 +09:00
2026-10-30 13:37:06 +01:00
2026-10-12 03:36:56 +09:00
2026-10-30 13:37:06 +01:00
2025-05-21 23:57:31 +09:00
2026-07-18 05:29:59 +09:00
2026-10-30 13:37:06 +01:00
2026-10-12 04:04:37 +09:00
2026-11-02 09:21:12 +01:00
2025-10-17 21:11:23 +09:00
2026-10-30 13:37:06 +01:00
2026-01-02 04:05:45 +09:00
2026-10-30 13:37:06 +01:00
2025-11-26 19:02:31 +09:00
2026-10-12 03:36:13 +09:00
2026-10-12 03:36:13 +09:00
2025-10-17 21:11:23 +09:00
2026-10-30 13:37:06 +01:00
2025-07-03 11:22:34 +02:00
2026-11-02 09:21:12 +01:00
2026-11-02 09:21:11 +01:00
2026-10-12 04:04:37 +09:00
2026-11-02 09:21:12 +01:00
2026-10-12 04:04:37 +09:00
2026-08-29 07:40:35 +09:00
2026-10-30 13:37:06 +01:00
2026-10-30 13:37:06 +01:00
2026-10-30 13:37:06 +01:00
2026-11-02 09:21:11 +01:00
2026-08-29 07:40:35 +09:00
2026-10-30 13:37:06 +01:00
2026-10-30 13:37:06 +01:00
2026-10-30 13:37:06 +01:00
2026-10-30 13:37:06 +01:00
2026-10-30 13:37:01 +01:00
2026-09-09 04:26:48 +09:00
2026-08-29 07:40:35 +09:00
2026-11-01 00:29:19 +09:00
2026-08-29 07:40:35 +09:00
2026-08-29 07:40:35 +09:00
2026-07-18 04:56:32 +09:00