Skip to content

Commit e3f924d

Browse files
GuoqingJiangshligit
authored andcommitted
md-cluster: remove some unnecessary dlm_unlock_sync
Since DLM_LKF_FORCEUNLOCK is used in lockres_free, we don't need to call dlm_unlock_sync before free lock resource. Reviewed-by: NeilBrown <neilb@suse.com> Signed-off-by: Guoqing Jiang <gqjiang@suse.com> Signed-off-by: Shaohua Li <shli@fb.com>
1 parent 400cb45 commit e3f924d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/md/md-cluster.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ static void recover_bitmaps(struct md_thread *thread)
284284
ret = bitmap_copy_from_slot(mddev, slot, &lo, &hi, true);
285285
if (ret) {
286286
pr_err("md-cluster: Could not copy data from bitmap %d\n", slot);
287-
goto dlm_unlock;
287+
goto clear_bit;
288288
}
289289
if (hi > 0) {
290290
if (lo < mddev->recovery_cp)
@@ -296,8 +296,6 @@ static void recover_bitmaps(struct md_thread *thread)
296296
md_wakeup_thread(mddev->thread);
297297
}
298298
}
299-
dlm_unlock:
300-
dlm_unlock_sync(bm_lockres);
301299
clear_bit:
302300
lockres_free(bm_lockres);
303301
clear_bit(slot, &cinfo->recovery_map);
@@ -766,7 +764,6 @@ static int gather_all_resync_info(struct mddev *mddev, int total_slots)
766764
md_check_recovery(mddev);
767765
}
768766

769-
dlm_unlock_sync(bm_lockres);
770767
lockres_free(bm_lockres);
771768
}
772769
out:
@@ -1182,7 +1179,6 @@ static void unlock_all_bitmaps(struct mddev *mddev)
11821179
if (cinfo->other_bitmap_lockres) {
11831180
for (i = 0; i < mddev->bitmap_info.nodes - 1; i++) {
11841181
if (cinfo->other_bitmap_lockres[i]) {
1185-
dlm_unlock_sync(cinfo->other_bitmap_lockres[i]);
11861182
lockres_free(cinfo->other_bitmap_lockres[i]);
11871183
}
11881184
}

0 commit comments

Comments
 (0)