linux/ipc
Christian Brauner eb50cbe14f
fs: port ->create() to pass const mnt_idmap
Convert to const struct mnt_idmap.

A mount's idmapping is immutable. The only thing that is allowed to be
modified afterwards is the reference count and that is hidden behind
mnt_idmap_get() and mnt_idmap_put(). Everything else only ever reads
from the idmapping. This is the same model that struct cred uses and the
idmapping is also rather sensitive.

So make the idmap argument const wherever we can. The conversion is done
from the bottom up so callers can continue to pass a non-const pointer
to a const parameter until the conversion is finished.

No functional changes.

Link: https://patch.msgid.link/20260901-work-idmap-const-v1-22-54ccd48e100b@kernel.org
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Seth Forshee <sforshee@kernel.org>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
2026-09-23 09:19:51 +02:00
..
compat.c
ipc_sysctl.c ipc: only destroy orphaned shm segments on sysctl write 2026-08-13 15:42:04 -07:00
Makefile
mq_sysctl.c treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
mqueue.c fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
msg.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
msgutil.c ns: drop custom reference count initialization for initial namespaces 2025-11-11 10:01:32 +01:00
namespace.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
sem.c ipc/sem.c: use unsigned int for nsops 2026-05-27 14:10:25 +02:00
shm.c mm/vma: update do_mmap() to use vma_flags_t 2026-08-06 18:57:01 -07:00
syscall.c y2038: remove CONFIG_64BIT_TIME 2019-11-15 14:38:27 +01:00
util.c ipc: limit next_id allocation to the valid ID range 2026-05-21 19:06:11 -07:00
util.h sched.h: move pid helpers to pid.h 2023-12-20 19:26:31 -05:00