diff options
author | Christian Brauner <brauner@kernel.org> | 2022-04-04 12:51:51 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2022-04-28 16:31:11 +0200 |
commit | 50db8d0273551f8792b4d9367d43a0093fb4512d (patch) | |
tree | 4b5f3d2dd8f9e6c0173fb289cbe40ba3036f2738 /fs/overlayfs | |
parent | dad7017a840d8d198074338224cd418d37b8f79d (diff) | |
download | linux-50db8d0273551f8792b4d9367d43a0093fb4512d.tar.bz2 |
ovl: handle idmappings for layer fileattrs
Take the upper mount's idmapping into account when setting fileattrs on
the upper layer. This is needed to support idmapped base layers with
overlay.
Cc: <linux-unionfs@vger.kernel.org>
Tested-by: Giuseppe Scrivano <gscrivan@redhat.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs')
-rw-r--r-- | fs/overlayfs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c index c7f2a2a8ac1d..7ed5df9c0fa6 100644 --- a/fs/overlayfs/inode.c +++ b/fs/overlayfs/inode.c @@ -537,7 +537,7 @@ int ovl_real_fileattr_set(struct path *realpath, struct fileattr *fa) if (err) return err; - return vfs_fileattr_set(&init_user_ns, realpath->dentry, fa); + return vfs_fileattr_set(mnt_user_ns(realpath->mnt), realpath->dentry, fa); } int ovl_fileattr_set(struct user_namespace *mnt_userns, |