- list_for_each_entry(ours, &our->our_req_list, ours_list) {
- struct object_update_request *our_req = ours->ours_req;
- unsigned int i;
- struct lu_object *obj;
- struct osp_object *osp_obj;
-
- for (i = 0; i < our_req->ourq_count; i++) {
- struct object_update *update;
-
- update = object_update_request_get(our_req, i, NULL);
- if (update == NULL)
- break;
-
- if (update->ou_type != OUT_WRITE)
- continue;
-
- if (!fid_is_sane(&update->ou_fid))
- continue;
-
- obj = lu_object_find_slice(env,
- &oth->ot_super.th_dev->dd_lu_dev,
- &update->ou_fid, NULL);
- if (IS_ERR(obj))
- break;
-
- osp_obj = lu2osp_obj(obj);
- if (osp_obj->opo_ooa != NULL) {
- spin_lock(&osp_obj->opo_lock);
- osp_obj->opo_ooa->ooa_attr.la_valid = 0;
- osp_obj->opo_stale = 1;
- spin_unlock(&osp_obj->opo_lock);
- }
- lu_object_put(env, obj);
- }
+ list_for_each_entry_safe(obj, next, &our->our_invalidate_cb_list,
+ opo_invalidate_cb_list) {
+ if (result < 0)
+ osp_invalidate(env, &obj->opo_obj);
+
+ spin_lock(&obj->opo_lock);
+ list_del_init(&obj->opo_invalidate_cb_list);
+ spin_unlock(&obj->opo_lock);
+
+ dt_object_put(env, &obj->opo_obj);