Whamcloud - gitweb
LU-6401 uapi: fix up lustre_ostid.h and lustre_fid.h
[fs/lustre-release.git] / lustre / obdecho / echo_client.c
index 9f383f8..9abea3c 100644 (file)
@@ -2176,8 +2176,11 @@ static int echo_create_object(const struct lu_env *env, struct echo_device *ed,
                RETURN(-EINVAL);
        }
 
-       if (ostid_id(&oa->o_oi) == 0)
-               ostid_set_id(&oa->o_oi, ++last_object_id);
+       if (ostid_id(&oa->o_oi) == 0) {
+               rc = ostid_set_id(&oa->o_oi, ++last_object_id);
+               if (rc)
+                       GOTO(failed, rc);
+       }
 
        rc = obd_create(env, ec->ec_exp, oa);
        if (rc != 0) {