dlm: don't use idr_remove_all()
[~shefty/rdma-dev.git] / fs / dlm / recover.c
index b2856e70164192837d06067e7417ac9a591235fb..236d1085d6a2eddadd756cae3c8dc1ad29df26eb 100644 (file)
@@ -359,13 +359,13 @@ static void recover_idr_clear(struct dlm_ls *ls)
        spin_lock(&ls->ls_recover_idr_lock);
 
        idr_for_each_entry(&ls->ls_recover_idr, r, id) {
+               idr_remove(&ls->ls_recover_idr, id);
                r->res_id = 0;
                r->res_recover_locks_count = 0;
                ls->ls_recover_list_count--;
 
                dlm_put_rsb(r);
        }
-       idr_remove_all(&ls->ls_recover_idr);
 
        if (ls->ls_recover_list_count != 0) {
                log_error(ls, "warning: recover_list_count %d",