linux/fs
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
..
9p fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
adfs ARM development for 7.1-rc1 2026-04-25 07:44:26 -07:00
affs fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
afs fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
autofs fs: port ->symlink() to pass const mnt_idmap 2026-09-23 09:19:50 +02:00
befs befs: handle set_blocksize failures 2026-05-21 13:39:35 +02:00
bfs fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
btrfs fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
cachefiles cachefiles,netfs: sunset ondemand mode 2026-08-12 16:24:26 +02:00
ceph fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
coda fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
configfs fs: port ->symlink() to pass const mnt_idmap 2026-09-23 09:19:50 +02:00
cramfs fs: add dedicated block device open helpers for filesystems 2026-06-29 10:31:52 +02:00
crypto fscrypt updates for 7.3 2026-08-17 19:04:16 -07:00
debugfs debugfs: warn if file creation failed due to uninitialized debugfs 2026-07-18 16:07:22 +02:00
devpts
dlm dlm: init per node debugfs before add to node hash 2026-05-08 08:38:03 -05:00
ecryptfs fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
efivarfs fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
erofs Changes since last update: 2026-08-25 12:27:41 -07:00
exfat fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
exportfs find_acceptable_alias(): skip NORCU aliases with zero refcount 2026-06-05 00:34:55 -04:00
ext2 fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
ext4 fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
f2fs fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
fat fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
fuse fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
gfs2 fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
hfs fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
hfsplus fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
hostfs fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
hpfs fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
hugetlbfs fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
iomap for-7.3/block-20260819 2026-08-20 13:55:16 -07:00
isofs isofs: Drop support of directory entries straddling blocks 2026-07-29 11:18:57 +02:00
jbd2 ext4: enable scoped NOFS when starting a handle in nojournal mode 2026-07-22 23:47:06 -04:00
jffs2 fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
jfs fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
kernfs fs: port ->mkdir() to pass const mnt_idmap 2026-09-23 09:19:50 +02:00
lockd NFS client updates for Linux 7.3 2026-08-26 15:09:21 -07:00
minix fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
netfs netfs: Fix folio_queue ENOMEM in writeback by adding a mempool 2026-07-28 15:42:31 +02:00
nfs fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
nfs_common NFS/localio: fix ref leak on nfs_uuid_add_file failure 2026-08-10 09:54:35 -04:00
nfsd nfsd: export NFSv4 callback op stats via netlink 2026-08-10 09:54:35 -04:00
nilfs2 fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
nls
notify fsnotify: Fix stale object mask after concurrent mark updates 2026-08-05 11:50:45 +02:00
ntfs fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
ntfs3 fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
ocfs2 fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
omfs fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
openpromfs
orangefs fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
overlayfs fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
proc fs: port ->permission() to pass const mnt_idmap 2026-09-23 09:19:49 +02:00
pstore
qnx4 qnx4: handle set_blocksize failures 2026-05-21 13:39:35 +02:00
qnx6 fs/qnx6: fix pointer arithmetic in directory iteration 2026-05-28 14:16:33 +02:00
quota quota: port to const mnt_idmap 2026-09-23 09:19:48 +02:00
ramfs fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
resctrl fs/resctrl: Inform user space when status buffer overflowed 2026-07-26 21:40:26 -07:00
romfs vfs-7.3-rc1.super 2026-08-17 13:57:04 -07:00
smb fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
squashfs squashfs: avoid thundering-herd cache wakeups 2026-08-19 19:55:06 -07:00
sysfs Driver core changes for 7.2-rc1 2026-06-15 12:41:17 +05:30
tests
tracefs fs: port ->mkdir() to pass const mnt_idmap 2026-09-23 09:19:50 +02:00
ubifs fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
udf fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
ufs fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
unicode unicode: Properly reject invalid encoding version strings 2026-07-31 16:33:14 -04:00
vboxsf fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
verity fsverity: Fix silent truncation in bpf_get_fsverity_digest() 2026-08-04 09:24:23 +02:00
xfs fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
zonefs zonefs: convert iomap ops to ->iomap_next() 2026-07-31 12:28:50 +02:00
aio.c mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07:00
anon_inodes.c libfs: drop redundant SB_I_NOEXEC/SB_I_NODEV in init_pseudo() callers 2026-06-04 10:10:49 +02:00
attr.c fs: port xattr to const mnt_idmap 2026-09-23 09:19:49 +02:00
backing-file.c fs: fix user path of nested backing files 2026-08-12 11:36:40 +02:00
bad_inode.c fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
binfmt_elf_fdpic.c binfmt_elf_fdpic: consume a stashed PT_INTERP substitute 2026-08-03 10:08:46 +02:00
binfmt_elf.c mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07:00
binfmt_flat.c
binfmt_misc_bpf.c binfmt_misc: let a 'B' entry bind its interpreters 2026-08-03 19:15:44 +02:00
binfmt_misc.c vfs-7.3-rc1.binfmt 2026-08-17 08:35:25 -07:00
binfmt_script.c
bpf_fs_kfuncs.c vfs-7.3-rc1.kfunc 2026-08-17 11:02:10 -07:00
buffer.c for-7.3/block-20260819 2026-08-20 13:55:16 -07:00
char_dev.c
compat_binfmt_elf.c
coredump.c coredump: use scoped_with_init_fs() for coredump path resolution 2026-06-29 10:44:08 +02:00
d_path.c fs: add failfs 2026-07-27 17:17:59 +02:00
dax.c mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07:00
dcache.c dcache: keep shrink_dcache_for_umount() making progress on busy roots 2026-07-31 10:46:02 +02:00
direct-io.c direct-io: remove IOCB_NOWAIT support 2026-05-26 11:01:55 -06:00
drop_caches.c
eventfd.c
eventpoll.c vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
exec.c Miscellaneous futex fixes: 2026-08-22 16:29:20 -07:00
failfs.c fs: port ->permission() to pass const mnt_idmap 2026-09-23 09:19:49 +02:00
fcntl.c vfs-7.2-rc1.misc 2026-06-15 03:59:45 +05:30
fhandle.c fhandle: reject detached mounts in capable_wrt_mount() 2026-07-01 15:26:32 +02:00
file_attr.c fs: port ->fileattr_set() to pass const mnt_idmap 2026-09-23 09:19:49 +02:00
file_table.c dentry memory safety stuff 2026-06-15 04:15:31 +05:30
file.c fs: retire stale comment in fget_task_next() 2026-05-28 14:27:00 +02:00
filesystems.c fs: fix switch/case indentation in sysfs() syscall 2026-08-12 11:36:40 +02:00
fs_context.c
fs_dirent.c
fs_parser.c
fs_pin.c
fs_struct.c fs: stop rewriting paths for PF_EXITING | PF_DUMPCORE 2026-06-29 10:54:43 +02:00
fs-writeback.c for-7.3/block-20260819 2026-08-20 13:55:16 -07:00
fserror.c
fsopen.c
init.c
inode.c fs: port inode_init_owner() to const mnt_idmap 2026-09-23 09:19:48 +02:00
internal.h fs: port ->get_acl() to pass const mnt_idmap 2026-09-23 09:19:50 +02:00
ioctl.c
Kconfig vfs-7.3-rc1.efs 2026-08-17 08:55:58 -07:00
Kconfig.binfmt binfmt_misc: add binfmt_misc_ops bpf struct_ops 2026-08-03 10:08:41 +02:00
kernel_read_file.c fs: use scoped_with_init_fs() for kernel_read_file_from_path_initns() 2026-06-29 10:44:09 +02:00
libfs.c fs: port ->rename() to pass const mnt_idmap 2026-09-23 09:19:50 +02:00
locks.c filelock: add an inode_lease_ignore_mask helper 2026-05-15 19:24:32 +02:00
Makefile vfs-7.3-rc1.failfs 2026-08-17 09:15:52 -07:00
mbcache.c
mnt_idmapping.c fs: port vfs{g,u}id helpers to const mnt_idmap 2026-09-23 09:19:47 +02:00
mount.h vfs-7.2-rc1.procfs 2026-06-15 04:07:58 +05:30
mpage.c
namei.c fs: port ->permission() to pass const mnt_idmap 2026-09-23 09:19:49 +02:00
namespace.c vfs-7.3-rc1.super 2026-08-17 13:57:04 -07:00
nsfs.c vfs-7.2-rc1.misc 2026-06-15 03:59:45 +05:30
nullfs.c vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
open.c fs: support FD_FAILFS_ROOT in fchroot() 2026-07-27 17:18:00 +02:00
pidfs.c fs: port xattr to const mnt_idmap 2026-09-23 09:19:49 +02:00
pipe.c Summary 2026-08-20 08:46:41 -07:00
pnode.c
pnode.h
posix_acl.c fs: port ->get_acl() to pass const mnt_idmap 2026-09-23 09:19:50 +02:00
proc_namespace.c fs: add real_fs to track task's actual fs_struct 2026-06-29 10:43:45 +02:00
read_write.c fs/read_write: Do not export __kernel_write() to the entire world 2026-06-05 14:46:20 +02:00
readdir.c
remap_range.c
select.c vfs-7.2-rc1.misc 2026-06-15 03:59:45 +05:30
seq_file.c seq_file: rename mangle_path to seq_mangle_path 2026-07-31 10:09:14 +02:00
signalfd.c
splice.c
stack.c
stat.c fs: annotate inode timestamp accessors 2026-07-31 10:09:11 +02:00
statfs.c
super.c vfs-7.3-rc1.super 2026-08-17 13:57:04 -07:00
sync.c sync_file_range: delete dead S_ISLNK code 2026-05-21 13:39:36 +02:00
sysctls.c
timerfd.c fs/timerfd: Use the new alarm/hrtimer functions 2026-05-01 21:36:13 +02:00
utimes.c
xattr.c fs: port ->get_acl() to pass const mnt_idmap 2026-09-23 09:19:50 +02:00