Skip to content

Commit bc70682

Browse files
braunerMiklos Szeredi
authored andcommitted
ovl: support idmapped layers
Now that overlay is able to take a layers idmapping into account allow overlay mounts to be created on top of idmapped mounts. Cc: <[email protected]> Tested-by: Giuseppe Scrivano <[email protected]> Reviewed-by: Amir Goldstein <[email protected]> Signed-off-by: Christian Brauner (Microsoft) <[email protected]> Signed-off-by: Miklos Szeredi <[email protected]>
1 parent 8bc0095 commit bc70682

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

fs/overlayfs/ovl_entry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static inline struct vfsmount *ovl_upper_mnt(struct ovl_fs *ofs)
9292

9393
static inline struct user_namespace *ovl_upper_mnt_userns(struct ovl_fs *ofs)
9494
{
95-
return &init_user_ns;
95+
return mnt_user_ns(ovl_upper_mnt(ofs));
9696
}
9797

9898
static inline struct ovl_fs *OVL_FS(struct super_block *sb)

fs/overlayfs/super.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -874,10 +874,6 @@ static int ovl_mount_dir_noesc(const char *name, struct path *path)
874874
pr_err("filesystem on '%s' not supported\n", name);
875875
goto out_put;
876876
}
877-
if (is_idmapped_mnt(path->mnt)) {
878-
pr_err("idmapped layers are currently not supported\n");
879-
goto out_put;
880-
}
881877
if (!d_is_dir(path->dentry)) {
882878
pr_err("'%s' not a directory\n", name);
883879
goto out_put;

0 commit comments

Comments
 (0)