diff options
| author | NeilBrown <neil@brown.name> | 2025-09-22 14:29:50 +1000 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-09-23 12:37:35 +0200 |
| commit | d7fb2c410240348edee7867c29b60688175dcc11 (patch) | |
| tree | ecc2d4e7aacb2c38dc6a754600d60bbb596b1ed6 /fs/cachefiles | |
| parent | e66ccd30dcdc2053388bd2ec20bd53e9897248d5 (diff) | |
VFS: unify old_mnt_idmap and new_mnt_idmap in renamedata
A rename operation can only rename within a single mount. Callers of
vfs_rename() must and do ensure this is the case.
So there is no point in having two mnt_idmaps in renamedata as they are
always the same. Only one of them is passed to ->rename in any case.
This patch replaces both with a single "mnt_idmap" and changes all
callers.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/cachefiles')
| -rw-r--r-- | fs/cachefiles/namei.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c index 91dfd0231877..d1edb2ac3837 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c @@ -387,10 +387,9 @@ try_again: cachefiles_io_error(cache, "Rename security error %d", ret); } else { struct renamedata rd = { - .old_mnt_idmap = &nop_mnt_idmap, + .mnt_idmap = &nop_mnt_idmap, .old_parent = dir, .old_dentry = rep, - .new_mnt_idmap = &nop_mnt_idmap, .new_parent = cache->graveyard, .new_dentry = grave, }; |
