On Thu, Apr 20, 2023 at 10:44 AM Alexander Larsson <alexl@xxxxxxxxxx> wrote: > > This allows us to get the real path from the ovl_entry in ovl_lookup() > before having finished setting up the resulting inode. > > Signed-off-by: Alexander Larsson <alexl@xxxxxxxxxx> > --- > fs/overlayfs/overlayfs.h | 2 ++ > fs/overlayfs/util.c | 25 ++++++++++++++++++------- > 2 files changed, 20 insertions(+), 7 deletions(-) > > diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h > index 4e327665c316..477008186d18 100644 > --- a/fs/overlayfs/overlayfs.h > +++ b/fs/overlayfs/overlayfs.h > @@ -395,6 +395,8 @@ void ovl_path_upper(struct dentry *dentry, struct path *path); > void ovl_path_lower(struct dentry *dentry, struct path *path); > void ovl_path_lowerdata(struct dentry *dentry, struct path *path); > void ovl_i_path_real(struct inode *inode, struct path *path); > +void ovl_entry_path_real(struct ovl_fs *ofs, struct ovl_entry *oe, > + struct dentry *upperdentry, struct path *path); > enum ovl_path_type ovl_path_real(struct dentry *dentry, struct path *path); > enum ovl_path_type ovl_path_realdata(struct dentry *dentry, struct path *path); > struct dentry *ovl_dentry_upper(struct dentry *dentry); > diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c > index 9a042768013e..77c954591daa 100644 > --- a/fs/overlayfs/util.c > +++ b/fs/overlayfs/util.c > @@ -351,19 +351,30 @@ struct dentry *ovl_i_dentry_upper(struct inode *inode) > return ovl_upperdentry_dereference(OVL_I(inode)); > } > > -void ovl_i_path_real(struct inode *inode, struct path *path) > -{ > - struct ovl_path *lowerstack = ovl_lowerstack(OVL_I_E(inode)); > +void ovl_entry_path_real(struct ovl_fs *ofs, Nit: I would use ovl_e_ prefix. Not critical. Thanks, Amir.