]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
VFS: unify old_mnt_idmap and new_mnt_idmap in renamedata
authorNeilBrown <neil@brown.name>
Mon, 22 Sep 2025 04:29:50 +0000 (14:29 +1000)
committerChristian Brauner <brauner@kernel.org>
Tue, 23 Sep 2025 10:37:35 +0000 (12:37 +0200)
commitd7fb2c410240348edee7867c29b60688175dcc11
treeecc2d4e7aacb2c38dc6a754600d60bbb596b1ed6
parente66ccd30dcdc2053388bd2ec20bd53e9897248d5
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>
fs/cachefiles/namei.c
fs/ecryptfs/inode.c
fs/namei.c
fs/nfsd/vfs.c
fs/overlayfs/overlayfs.h
fs/smb/server/vfs.c
include/linux/fs.h