diff options
| author | Christian Brauner <brauner@kernel.org> | 2026-09-01 14:14:31 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-09-23 09:19:48 +0200 |
| commit | b4388f171cc029f2d5bd572ac94cd6d534bbf7ed (patch) | |
| tree | 1b7f5fd4dadc3f74f0d956f4fc680b3fd0f904df /security | |
| parent | 0c18a70900eeef375290c702b0be7905533eb467 (diff) | |
fs: port i_{g,u}id_{needs_}update() to 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-6-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>
Diffstat (limited to 'security')
| -rw-r--r-- | security/integrity/evm/evm_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c index 66f27653cdac..06e187c9912d 100644 --- a/security/integrity/evm/evm_main.c +++ b/security/integrity/evm/evm_main.c @@ -933,7 +933,7 @@ static inline void evm_inode_post_remove_acl(struct mnt_idmap *idmap, evm_inode_post_removexattr(dentry, acl_name); } -static int evm_attr_change(struct mnt_idmap *idmap, +static int evm_attr_change(const struct mnt_idmap *idmap, struct dentry *dentry, struct iattr *attr) { struct inode *inode = d_backing_inode(dentry); |
