In the cleanup phase of mdt_hsm_cdt_stop(), there is no need to
recursively unlock the mdt_objects that were to be restored.
Signed-off-by: Quentin Bouget <quentin.bouget@cea.fr>
Change-Id: I4d9212966722d4a2fcecc26210308ea51a200dcd
Reviewed-on: https://review.whamcloud.com/27033
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
cdt_mti = lu_context_key_get(&cdt->cdt_env.le_ctx, &mdt_thread_key);
mutex_lock(&cdt->cdt_restore_lock);
list_for_each_entry_safe(crh, tmp3, &cdt->cdt_restore_hdl, crh_list) {
cdt_mti = lu_context_key_get(&cdt->cdt_env.le_ctx, &mdt_thread_key);
mutex_lock(&cdt->cdt_restore_lock);
list_for_each_entry_safe(crh, tmp3, &cdt->cdt_restore_hdl, crh_list) {
- struct mdt_object *child;
-
- /* give back layout lock */
- child = mdt_object_find(&cdt->cdt_env, mdt, &crh->crh_fid);
- if (!IS_ERR(child))
- mdt_object_unlock_put(cdt_mti, child, &crh->crh_lh, 1);
-
list_del(&crh->crh_list);
list_del(&crh->crh_list);
+ /* give back layout lock */
+ mdt_object_unlock(cdt_mti, NULL, &crh->crh_lh, 1);
OBD_SLAB_FREE_PTR(crh, mdt_hsm_cdt_kmem);
}
mutex_unlock(&cdt->cdt_restore_lock);
OBD_SLAB_FREE_PTR(crh, mdt_hsm_cdt_kmem);
}
mutex_unlock(&cdt->cdt_restore_lock);