diff options
| author | Christian Brauner <brauner@kernel.org> | 2026-09-01 14:14:41 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-09-23 09:19:50 +0200 |
| commit | 03a56ee3418b8e2cc3218b1a671bf75de2e4b7ad (patch) | |
| tree | df518bcafdfb10980794b03933d3a37fa5470aa8 /fs/ecryptfs | |
| parent | 737362c7012aff5fcc238de855c1f89ba8a79abe (diff) | |
| download | linux-next-03a56ee3418b8e2cc3218b1a671bf75de2e4b7ad.tar.gz linux-next-03a56ee3418b8e2cc3218b1a671bf75de2e4b7ad.zip | |
fs: port ->get_acl() 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-16-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 'fs/ecryptfs')
| -rw-r--r-- | fs/ecryptfs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 1e5146485214..bd1187661d6d 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c @@ -1090,7 +1090,7 @@ static int ecryptfs_fileattr_set(const struct mnt_idmap *idmap, return rc; } -static struct posix_acl *ecryptfs_get_acl(struct mnt_idmap *idmap, +static struct posix_acl *ecryptfs_get_acl(const struct mnt_idmap *idmap, struct dentry *dentry, int type) { return vfs_get_acl(idmap, ecryptfs_dentry_to_lower(dentry), |
