Skip to content

Commit 6e6d9f2

Browse files
GuoqingJiangNeilBrown
authored andcommitted
md-cluster: add missed lockres_free
We also need to free the lock resource before goto out. Reviewed-by: Goldwyn Rodrigues <rgoldwyn@suse.com> Signed-off-by: Guoqing Jiang <gqjiang@suse.com> Signed-off-by: NeilBrown <neilb@suse.com>
1 parent b2b9bff commit 6e6d9f2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/md/md-cluster.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,8 +647,10 @@ static int gather_all_resync_info(struct mddev *mddev, int total_slots)
647647
lockres_free(bm_lockres);
648648
continue;
649649
}
650-
if (ret)
650+
if (ret) {
651+
lockres_free(bm_lockres);
651652
goto out;
653+
}
652654
/* TODO: Read the disk bitmap sb and check if it needs recovery */
653655
dlm_unlock_sync(bm_lockres);
654656
lockres_free(bm_lockres);

0 commit comments

Comments
 (0)