diff options
Diffstat (limited to 'xlators/features/snapview-server/src/snapview-server.c')
| -rw-r--r-- | xlators/features/snapview-server/src/snapview-server.c | 18 | 
1 files changed, 15 insertions, 3 deletions
diff --git a/xlators/features/snapview-server/src/snapview-server.c b/xlators/features/snapview-server/src/snapview-server.c index ed56937aa7c..664889b4a16 100644 --- a/xlators/features/snapview-server/src/snapview-server.c +++ b/xlators/features/snapview-server/src/snapview-server.c @@ -323,6 +323,8 @@ svs_lookup_entry (xlator_t *this, loc_t *loc, struct iatt *buf,          svs_inode_t    *inode_ctx                       = NULL;          glfs_object_t  *parent_object                   = NULL;          uuid_t          gfid                            = {0, }; +        int             ret                             = -1; +          GF_VALIDATE_OR_GOTO ("snapview-server", this, out);          GF_VALIDATE_OR_GOTO (this->name, loc, out); @@ -364,9 +366,19 @@ svs_lookup_entry (xlator_t *this, loc_t *loc, struct iatt *buf,          }          if (gf_uuid_is_null (loc->gfid) && -            gf_uuid_is_null (loc->inode->gfid)) -                svs_uuid_generate (gfid, parent_ctx->snapname, object->gfid); -        else { +            gf_uuid_is_null (loc->inode->gfid)) { +                ret = svs_uuid_generate (this, gfid, parent_ctx->snapname, +                                         object->gfid); +                /* +                 * should op_errno be something else such as +                 * EINVAL or ESTALE? +                 */ +                if (ret) { +                        op_ret = -1; +                        *op_errno = EIO; +                        goto out; +                } +        } else {                  if (!gf_uuid_is_null (loc->inode->gfid))                          gf_uuid_copy (gfid, loc->inode->gfid);                  else  | 
