diff options
| -rw-r--r-- | xlators/features/gfid-access/src/gfid-access.c | 12 | 
1 files changed, 10 insertions, 2 deletions
diff --git a/xlators/features/gfid-access/src/gfid-access.c b/xlators/features/gfid-access/src/gfid-access.c index 438fb08aaf1..da2cda97c9e 100644 --- a/xlators/features/gfid-access/src/gfid-access.c +++ b/xlators/features/gfid-access/src/gfid-access.c @@ -799,6 +799,16 @@ ga_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)          inode_t      *true_inode    = NULL;          int32_t       op_errno = ENOENT; +        priv = this->private; + +        /* Handle nameless lookup on ".gfid" */ +        if (!loc->parent && __is_gfid_access_dir(loc->gfid)) { +                STACK_UNWIND_STRICT (lookup, frame, 0, 0, loc->inode, +                                     &priv->gfiddir_stbuf, xdata, +                                     &priv->root_stbuf); +                return 0; +        } +          /* if its discover(), no need for any action here */          if (!loc->name)                  goto wind; @@ -831,8 +841,6 @@ ga_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)                  goto wind;          } -        priv = this->private; -          /* need to check if the lookup is on virtual dir */          if ((loc->name && !strcmp (GF_GFID_DIR, loc->name)) &&              ((loc->parent && __is_root_gfid (loc->parent->gfid)) ||  | 
