Skip to content

Commit 50db8d0

Browse files
braunerMiklos Szeredi
authored andcommitted
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>
1 parent dad7017 commit 50db8d0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/overlayfs/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ int ovl_real_fileattr_set(struct path *realpath, struct fileattr *fa)
537537
if (err)
538538
return err;
539539

540-
return vfs_fileattr_set(&init_user_ns, realpath->dentry, fa);
540+
return vfs_fileattr_set(mnt_user_ns(realpath->mnt), realpath->dentry, fa);
541541
}
542542

543543
int ovl_fileattr_set(struct user_namespace *mnt_userns,

0 commit comments

Comments
 (0)