diff options
| author | Christian Brauner <brauner@kernel.org> | 2026-09-01 14:14:46 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-09-23 09:19:50 +0200 |
| commit | 6bd532e338759278b5cc1e912cf9b67a997e658c (patch) | |
| tree | f4e5858c43e6a951af4b015e97ddd03bf611677c /fs/ecryptfs | |
| parent | 566707035a6e0c859632523f679d9454ebbbe184 (diff) | |
| download | linux-next-6bd532e338759278b5cc1e912cf9b67a997e658c.tar.gz linux-next-6bd532e338759278b5cc1e912cf9b67a997e658c.zip | |
fs: port ->symlink() 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-21-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 f5340d2b42f4..f9a3c88c4fbd 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c @@ -462,7 +462,7 @@ static int ecryptfs_unlink(struct inode *dir, struct dentry *dentry) return ecryptfs_do_unlink(dir, dentry, d_inode(dentry)); } -static int ecryptfs_symlink(struct mnt_idmap *idmap, +static int ecryptfs_symlink(const struct mnt_idmap *idmap, struct inode *dir, struct dentry *dentry, const char *symname) { |
