On Tue, 29 Mar 2022 at 12:36, Christian Brauner <brauner@xxxxxxxxxx> wrote: > > When creating objects in the upper layer we need to pass down the upper > idmapping into the respective vfs helpers in order to support idmapped > base layers. The vfs helpers will take care of the rest. > > Cc: <linux-unionfs@xxxxxxxxxxxxxxx> > Tested-by: Giuseppe Scrivano <gscrivan@xxxxxxxxxx> > Reviewed-by: Amir Goldstein <amir73il@xxxxxxxxx> > Signed-off-by: Christian Brauner (Microsoft) <brauner@xxxxxxxxxx> > --- > fs/overlayfs/overlayfs.h | 22 +++++++++++----------- > 1 file changed, 11 insertions(+), 11 deletions(-) > > diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h > index 8fae64722eda..27f79be097b1 100644 > --- a/fs/overlayfs/overlayfs.h > +++ b/fs/overlayfs/overlayfs.h > @@ -125,7 +125,7 @@ static inline const char *ovl_xattr(struct ovl_fs *ofs, enum ovl_xattr ox) > static inline int ovl_do_rmdir(struct ovl_fs *ofs, > struct inode *dir, struct dentry *dentry) > { > - int err = vfs_rmdir(&init_user_ns, dir, dentry); > + int err = vfs_rmdir(ovl_upper_idmap(ofs), dir, dentry); ovl_upper_idmap() is not defined by this or earlier patches. Thanks, Miklos