struct lu_server_fld *fld;
struct dt_object *obj;
const struct dt_it_ops *iops;
+ struct dt_key *key;
+ int rc;
if (param == NULL || param->fsp_stop)
return NULL;
LASSERT(obj != NULL);
iops = &obj->do_index_ops->dio_it;
- iops->load(¶m->fsp_env, param->fsp_it, *pos);
+ rc = iops->load(¶m->fsp_env, param->fsp_it, *pos);
+ if (rc <= 0)
+ return NULL;
+
+ key = iops->key(¶m->fsp_env, param->fsp_it);
+ if (IS_ERR(key))
+ return NULL;
+
+ *pos = be64_to_cpu(*(__u64 *)key);
- *pos = be64_to_cpu(*(__u64 *)iops->key(¶m->fsp_env, param->fsp_it));
return param;
}