On Sep 1, 2026 Christian Brauner <[email protected]> wrote: > > 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. > > Signed-off-by: Christian Brauner (Amutable) <[email protected]> > Reviewed-by: Jan Kara <[email protected]> > --- > Documentation/filesystems/locking.rst | 2 +- > Documentation/filesystems/vfs.rst | 2 +- > fs/9p/vfs_inode.c | 2 +- > fs/9p/vfs_inode_dotl.c | 4 ++-- > fs/bad_inode.c | 2 +- > fs/btrfs/inode.c | 2 +- > fs/ceph/dir.c | 2 +- > fs/ecryptfs/inode.c | 2 +- > fs/ext2/namei.c | 2 +- > fs/ext4/namei.c | 2 +- > fs/f2fs/namei.c | 2 +- > fs/fuse/dir.c | 4 ++-- > fs/gfs2/inode.c | 2 +- > fs/hfsplus/dir.c | 2 +- > fs/hostfs/hostfs_kern.c | 2 +- > fs/hpfs/namei.c | 2 +- > fs/hugetlbfs/inode.c | 2 +- > fs/jffs2/dir.c | 4 ++-- > fs/jfs/namei.c | 2 +- > fs/minix/namei.c | 2 +- > fs/nfs/dir.c | 2 +- > fs/nfs/internal.h | 2 +- > fs/nilfs2/namei.c | 2 +- > fs/ntfs/namei.c | 2 +- > fs/ntfs3/namei.c | 2 +- > fs/ocfs2/namei.c | 2 +- > fs/overlayfs/dir.c | 2 +- > fs/ramfs/inode.c | 2 +- > fs/smb/client/cifsfs.h | 2 +- > fs/smb/client/dir.c | 2 +- > fs/ubifs/dir.c | 2 +- > fs/udf/namei.c | 2 +- > fs/ufs/namei.c | 2 +- > fs/xfs/xfs_iops.c | 2 +- > include/linux/fs.h | 2 +- > include/linux/lsm_hook_defs.h | 2 +- > include/linux/security.h | 4 ++-- > mm/shmem.c | 4 ++-- > security/integrity/evm/evm_main.c | 2 +- > security/integrity/ima/ima_main.c | 2 +- > security/security.c | 2 +- > 41 files changed, 46 insertions(+), 46 deletions(-)
Acked-by: Paul Moore <[email protected]> (LSM) -- paul-moore.com

