On Thu, Jan 4, 2018 at 6:20 PM, Amir Goldstein <amir73il@xxxxxxxxx> wrote: > Lookup overlay inode in cache by origin inode, so we can decode a file > handle of an open file even if the index has a whiteout index entry to > mark this overlay inode was unlinked. > > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx> > --- > fs/overlayfs/export.c | 22 ++++++++++++++++++++-- > fs/overlayfs/inode.c | 16 ++++++++++++++++ > fs/overlayfs/overlayfs.h | 1 + > 3 files changed, 37 insertions(+), 2 deletions(-) > > diff --git a/fs/overlayfs/export.c b/fs/overlayfs/export.c > index 602bada474ba..6ecb54d4b52c 100644 > --- a/fs/overlayfs/export.c > +++ b/fs/overlayfs/export.c > @@ -385,13 +385,21 @@ static struct dentry *ovl_lower_fh_to_d(struct super_block *sb, > struct ovl_path *stack = &origin; > struct dentry *dentry = NULL; > struct dentry *index = NULL; > + struct inode *inode = NULL; > + bool is_deleted = false; > int err; > > /* First lookup indexed upper by fh */ Why not first look up origin, then look up ovl inode by origin? It seems a faster path than going through the index first. Obviously if icache lookup fails then we need to look up index, but the common case will the cached one, so that should be the fast one, no? Thanks, Miklos