Re: [PATCH 11/27] fs: port acl to const mnt_idmap
From: Paul Moore
Date: Wed Sep 02 2026 - 16:08:13 EST
On Sep 1, 2026 Christian Brauner <brauner@xxxxxxxxxx> 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) <brauner@xxxxxxxxxx>
> Reviewed-by: Jan Kara <jack@xxxxxxx>
> ---
> fs/ntfs/ea.c | 4 ++--
> fs/ntfs/ea.h | 2 +-
> fs/ntfs/namei.c | 2 +-
> fs/ntfs3/inode.c | 2 +-
> fs/ntfs3/ntfs_fs.h | 4 ++--
> fs/ntfs3/xattr.c | 4 ++--
> fs/posix_acl.c | 6 +++---
> include/linux/lsm_hook_defs.h | 8 ++++----
> include/linux/posix_acl.h | 4 ++--
> include/linux/security.h | 16 ++++++++--------
> security/integrity/evm/evm_main.c | 10 +++++-----
> security/integrity/ima/ima_appraise.c | 4 ++--
> security/security.c | 8 ++++----
> security/selinux/hooks.c | 6 +++---
> security/smack/smack_lsm.c | 6 +++---
> 15 files changed, 43 insertions(+), 43 deletions(-)
Acked-by: Paul Moore <paul@xxxxxxxxxxxxxx> (LSM, SELinux)
--
paul-moore.com