diff options
Diffstat (limited to 'xlators/features/marker/src/marker.c')
| -rw-r--r-- | xlators/features/marker/src/marker.c | 27 | 
1 files changed, 20 insertions, 7 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index 5890c0394..534437479 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -506,6 +506,9 @@ marker_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,          if (op_ret == -1 || local == NULL)                  goto out; +        if (uuid_is_null (local->loc.gfid)) +                uuid_copy (local->loc.gfid, buf->ia_gfid); +          priv = this->private;          if (priv->feature_enabled & GF_QUOTA) @@ -577,6 +580,9 @@ marker_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,          if (op_ret == -1 || local == NULL)                  goto out; +        if (uuid_is_null (local->loc.gfid)) +                uuid_copy (local->loc.gfid, buf->ia_gfid); +          priv = this->private;          if (priv->feature_enabled & GF_QUOTA) @@ -1676,6 +1682,9 @@ marker_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,          if (op_ret == -1 || local == NULL)                  goto out; +        if (uuid_is_null (local->loc.gfid)) +                uuid_copy (local->loc.gfid, buf->ia_gfid); +          priv = this->private;          if (priv->feature_enabled & GF_QUOTA) @@ -1746,6 +1755,9 @@ marker_mknod_cbk (call_frame_t *frame, void *cookie, xlator_t *this,          if (op_ret == -1 ||  local == NULL)                  goto out; +        if (uuid_is_null (local->loc.gfid)) +                uuid_copy (local->loc.gfid, buf->ia_gfid); +          priv = this->private;          if ((priv->feature_enabled & GF_QUOTA) && (S_ISREG (local->mode))) { @@ -2204,19 +2216,20 @@ marker_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,          frame->local = NULL; +        STACK_UNWIND_STRICT (lookup, frame, op_ret, op_errno, inode, buf, +                             dict, postparent); + +        if (op_ret == -1 || local == NULL) +                goto out; +          /* copy the gfid from the stat structure instead of inode,           * since if the lookup is fresh lookup, then the inode           * would have not yet linked to the inode table which happens           * in protocol/server.           */ -        if (!op_ret && local && uuid_is_null (local->loc.gfid)) -                        uuid_copy (local->loc.gfid, buf->ia_gfid); +        if (uuid_is_null (local->loc.gfid)) +                uuid_copy (local->loc.gfid, buf->ia_gfid); -        STACK_UNWIND_STRICT (lookup, frame, op_ret, op_errno, inode, buf, -                             dict, postparent); - -        if (op_ret == -1 || local == NULL) -                goto out;          priv = this->private;  | 
